Ion-nav-button always hidden (Ionic v1)


#1

Hey guys,

I tried to put a back button on my header and it never appears, it’s always hidden.
How can I make it visible ? And how can I hide it on my menu page ?

NB : Log in page > Menu Page
Don’t want it to appears on my menu (don’t want people to come back on log in)

header.html :

<ion-nav-bar class="bar-positive">
    <ion-nav-back-button></ion-nav-back-button>
    <toaster-container></toaster-container> //My toast service
    <ion-nav-title>
    	<h1 class="title">Some title here !</h1>
    </ion-nav-title>
</ion-nav-bar>

app.html

<body ng-app="app" animation="slide-left-right-ios7">
    <div data-ui-view="header"></div>
    <div data-ui-view='content'></div>
</body>

At least, animation doesn’t work too…
I’m totally a beginner in AngularJS, and web apps. I got some directives in my JS but nothing who affects the buttons i think.

Thank you in advance,
Kev.


#2

Can you clarify where and when you need the back button exactly. You have a Login Page( No Back Button) and you will go to the first page with Menu( No Back Button ) right?


Problem in using ion-item with ui-sref
#3

I want it everywhere, expect Login & Menu pages.


#4

depends how you are navigating --> if you set the root of the history --> there will be no animation and also no backbutton :wink:


#5

How do i set the root of history ?

I got this in my app.js :

$urlRouterProvider.otherwise('/login');
$ionicConfigProvider.backButton.text('');

And all my states and directives below, that’s all.


#6

Sorry for update, still no solutions ?

I tried few things out but the button still got the class “hide”.


#7

damn it, i copy pasted my code from ionic v1 to ionic 2 and the f**** button menu is always hidden. Any guess guys? thanks