0
votes

I started working on ionic app & doing some example reviews for the App i am going to develop. In my case i combined the two templates from ionic market where login kit is from one template & dashboard kit from another. When i am doing the login & navigating to dashboard, the menu on the top left side does not displayed. While if i call it directly by typing url on address bar, it is getting displayed. My login controller is this:

app.controller('LoginCtrl', function ($scope, $state,$ionicModal,$ionicPopover, $timeout) {
  $scope.login = function(){
  $state.go('app.components');
 };
});

Beginning of the side menu is:

<ion-side-menus enable-menu-with-back-views="false">
<ion-side-menu-content>
    <ion-nav-bar class="bar-assertive">
        <ion-nav-back-button class="no-text">
........

Dashboard page:

<ion-view view-title="Ionic Demo+">
<ion-content>
    <div class="bar bar-subheader bar-stable static text-center">
        <strong class="title">All Ionic, Materialized</strong>
    </div>

For instance, i tried <ion-side-menus enable-menu-with-back-views="true"> then it displayed me menu bar button but when i clicked on it & again clicked on it to hide it, it had brought me back to login page.

Then i tried <ion-view view-title="Ionic Demo+" hide-back-button="true"> & it did hide the back button but it doesn't showed me the menu button.

How do i display menu on my dashboard page. I only want to display it on dashboard & nowhere else in the app.

1

1 Answers

1
votes

Got the answer myself:

i just need to disable it before the controller of the targeted view gets called.

I did this with:

    $ionicHistory.nextViewOptions({disableBack: true});
    $state.go('app.components')