I am using Angular UI router with Ionic. I want to redirect page from one to another within a function.
I have default menu in all pages.
I tried used $state.go. but $state.go is changing the whole url and creating a back button.
I want my menu still be there in my page.
Here is my 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 what i want is, I want to redirect the page inside a function call, and my menu should be there. i dont want default back button.
Please help me to do this.
Thanks, Priya.


.back-button{display:none;}- Ved