0
votes

i have a big problem. I'm working on a side menu app, and i need to open another view from another view. I tried to use $state.go and $location.go but when i open a window, this window have the back button of the navigation bar. I want the window will open like when i click on a item on my menu, so with the sidemenu icon on left of the nav-bar. What is the method to open a "new window"?

when i open the new view with AngularJS $state.go and $location.path:

1

when i open the same with href="url" in my HTML sidemenu :

2

I need to open the new view like the second screenshot using angularJS. How can i hit it?

1
What do you mean with "open new window in Ionic sidemenu app"? Ionic apps are generally Single Page Apps... only one window... Please explain. - beaver
yea, sorry. So: with window i mean a new view. When i open a new view with $state and $location, the new view is opened but the nav bar on left display the "back button". I want open this new view like when i open it from the side menu, so on the left of my nav bar i have the menu button. Now i upload my original post with some screens - Steph8
It's also a good practice to provide a minimal verifiable example... - beaver
i added the screenshots now. And sorry for my bad english. - Steph8

1 Answers

0
votes

If you don't need navigation back button (eventually on condition) you can use this code in your index.html:

  <ion-nav-bar class="bar-stable">
    <ion-nav-back-button hide-back-button="{{options.hideBackButton}}">
    </ion-nav-back-button>
  </ion-nav-bar>

When you need to hide the back button set options.hideBackButton = false;

Another way is to use: $ionicNavBarDelegate.showBackButton(false);