Answer the question
In order to leave comments, you need to log in
How to save information when transitioning between ui-router states?
Good afternoon!
How to store information between pages when going forward back?
Angular 1.5 + ui-router
Router code
function routerConfig($stateProvider, $urlRouterProvider) {
$stateProvider
.state('home', {
url: '/',
templateUrl: 'app/main/main.html',
controller: 'MainController',
controllerAs: 'main'
})
.state('result', {
url: '/result',
templateUrl: 'app/result/result.html',
controller: 'ResultController',
controllerAs: 'result',
params: {
searchResult: null
}
})
.state('page', {
url: '/page',
templateUrl: 'app/page/page.html',
controller: 'PageController',
controllerAs: 'page'
});
$urlRouterProvider.otherwise('/');
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question