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.
i tried used $state.go
. $state.go
changing whole url , creating button.
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.
- for menu there, dashboard has child of main view.
app.login
meanslogin
child view of app. - back button appears because login view still in history. have clear history before view change on successful login. $ionichistory help.
Comments
Post a Comment