zachfitz / Ionic-Material

Material Design style and animations for Ionic
http://ionicmaterial.com
Other
2.9k stars 904 forks source link

what controls back button and fab-home? what are header fab? #189

Closed andreabisello closed 8 years ago

andreabisello commented 8 years ago

Hi

i have some difficults to understand some things :

1) what controls back button? i make a copy of activity. if i reach activity by menu.html , as for example

<a ui-sref="app.activity" class="tab-item"><i class="icon ion-arrow-graph-up-right"></i> Activity</a> the reached view has back button, image but if i reach the same view by right menu with `

Activity

` there is no back button.

what does controls the back button ?

2)

i modified app.js in order to launch a view called matches on a click.

template: '<button id="fab-home" ui-sref="app.matches" class="button button-fab button-fab-bottom-right button-energized-900"><i class="icon ion-plus"></i></button>',

2a) matches view doesn't have back button (similar to problem1). why? 2b) matches view contains again the same "fab-home" button. why? image

3)

controllers.js contains $scope.setHeaderFab function. what is the intent of this function? what is a "fab"?

MANY THANKS for any help.

andreabisello commented 8 years ago

please, someone can help me ? who set the hide class? image

andreabisello commented 8 years ago

problem was related to nav history.

i don't know why but entering in a state by the right menu, there is no "history back".

so i removed ui-sref=XXX and i added a function that calls $state.go(XXX) so history has a back status and back button can be used.

neslinesli93 commented 8 years ago

I had a very similar problem: instead of the back button, it happened to me with the main menu botton. After some state change, all of a sudden it disappeared because the class hide was randomly applied to it. Long story short, I had to revisit my application navbar, since probably it was a problem with the ionic overrides this library makes. I think I solved it by removing all the "hide-back-button" classes, and by adding back buttons and menu buttons manually in every view