angularjs - how to use ui-router inside a function with static menu without creating default back button -


i using angular ui router ionic. want redirect page 1 within function.

i have default menu in pages.

enter image description here

i tried used $state.go. $state.go changing whole url , creating button.

enter image description here

i want menu still there in page.

here code: controller.js:

$scope.changestate = function () {     $state.go('app.registration');   }; 

app.js

app.config(function($stateprovider, $urlrouterprovider) {   $stateprovider      .state('app', {     url: '/app',     abstract: true,     templateurl: 'templates/menu.html',     controller: 'appctrl'   })     .state('app.login', {       url: '/login',       views: {         'menucontent': {           templateurl: 'templates/login.html',           controller: 'signincontroller'         }       }     })      .state('app.registration', {       url: '/registration',       views: {         'menucontent': {           templateurl: 'templates/registration.html',           controller: 'signupcontroller'         }       }     })  

})

finally want is, want redirect page inside function call, , menu should there. dont want default button.

please me this.

thanks, priya.

  1. for menu there, dashboard has child of main view. app.login means login child view of app.
  2. back button appears because login view still in history. have clear history before view change on successful login. $ionichistory help.

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -