Hello all I want to know how to make a return to the previous page in AngularJS with state.go stateParams or between two different pages I tried this but the variable is empty:
$ctrl.next = function(){
$state.go('modiffili', {object:'test'});
};
and this controller of my second page :
(function (angular) {
'use strict';
modiffiliCtrl.$inject=['$state','$stateParams'];
function modiffiliCtrl($state,$stateParams) {
var $ctrl = this;
console.log('modiffiliController');
console.log($state.params.object);
$ctrl.retour = function () {
$state.go('^');
}
I can't to use rootScope. thank you to help me !