Having problem with UI navigation


#1

hi,

here is what i am trying to do in the UI navigation-

see this -

  1. i have 2 tabs and a side menu.
  2. i am trying to open the screen by clicking the side menu content; when i click like Sign-in it should open in a screen which would go to login screen and the tabbed view should get hidden. in that screen i should be able to navigate other screens like sign-up.
    for e.g.
    click sign-in > login screen opens > if i click sign-up button in login screen > sign up form should open > back button gets enabled at top left corner > if i press back button it should take me back to the login screen > and also i have a close link at top right corner of login and sign-up > clicking those should close the login/sign-up screen and take me back to the tabbed screen from where user had clicked the side menu items.

but if you see the plunker, it’s not happening. it opens the login screen but,
a. i can’t go back to the tabbed screen
b. sign-up screen is not opening

please help.

regards,


#2
  1. Login is shown as modal. It will not have back arrow or you will not go back till you close the modal.

  2. You are using ng-click for signup and not href. And signup() is not defined anywhere so it is not opening.


#3

hi Gaurav,

actually they are not modal views; sorry for any confusion;

regards,

// setup an abstract state for the tabs directive
.state('tab', {
  url: "/tab",
  abstract: true,
  //templateUrl: "tabs.html",
  views: {
        'app': {
          templateUrl: 'tabs.html',
          controller: 'AppCtrl'
        }
      }      
  
})

.state('tab.modal',{
  url:"/login",
  views:{
    'modal':{
      templateUrl:"login.html",
      controller:"AppCtrl"
    }
  }
})

.state('tab.signup',{
  url:"/signup",
  views:{
    'modal':{
      templateUrl:"signup.html",
      controller:"AppCtrl"
    }
  }
})

#4

and i have fixed #2.
now I have href in it. sorry about that. but still it’s not opening sign-up.


#5

i tweaked the code a bit and now #b is working.

but #a is still now working - need to go back to the tabbed view.
here is the navigation in plnkr-
from side menu > click sign-in > click close > expected behavior is to go back to tabbed view but it’s not going.

please help.

regards,