Change order of items in nav-bar


#1

I’m creating an application and in a certain view I need to show the Back and Toggle button in the nav-bar. This is easy and I have been able to accomplish this with the Ionic documentation but I need to change the order of these items, first Toggle button and then Back button.

Is it possible?

Thanks.


Change Order of Back- and Toggle-Button
#2

Maybe can be a good idea to float:left the navigation button and float: right the back button.


#3

it is just easy
<ion-navbar> <button class="button button-clear icon icon-nav"></button> <ion-nav-back-button class="button-icon icon-back"></ion-nav-back-button> </ion-nav-bar>


#4

yeah, this solution is much better!


#5

And if you want to have additional buttons on the right:

<ion-navbar>
  <button class="button button-clear icon icon-nav"></button>
  <ion-nav-back-button class="button-icon icon-back"></ion-nav-back-button>
</ion-nav-bar>
<ion-nav-buttons side="right">
  <button class="button button-clear icon icon-cart"></button>
</ion-nav-buttons>

#6

Well, it doesn’t seem to be so easy as expected. I started the project with the side menu and I have continued with that app structure.

In the views I can add new items to the nav-bar but the back button is added in the menu.html view and can not be added from another view although I remove the back button from menu.html.


#7

Maybe you can build a default navbar and for some sites (where you need another navbar) you could use this:
http://ionicframework.com/docs/api/directive/ionView/

And add a new own special navbar for that views.

greetz, bengtler


#8

It hides the nav bar so, in the view that I have to show toggle icon first and then back button I added the code you posted before but it only shows the back button!!

It may be some kind of bug.