i using angular ionic. i not want user have login again in case logged in , did not logout last time used application. reason, using local storage check if user logged in. tried putting code in run block. $rootscope.$on('$statechangestart', function (event, tostate, toparams, fromstate, fromparams) { if($localstorage.userinfo){ $state.go('deployment'); //this line 270 of app.js event.preventdefault(); return; } }) but gives error says: rangeerror: maximum call stack size exceeded @ scope.$broadcast (ionic.bundle.js:23414) @ object.transitionto (ionic.bundle.js:40804) @ object.go (ionic.bundle.js:40671) @ app.js:270 @ scope.$broadcast (ionic.bundle.js:23412) @ object.transitionto (ionic.bundle.js:40804) @ object.go (ionic.bundle.js:40671) @ app.js:270 @ scope.$broadcast (ionic.bundle.js:23412) @ object.transitionto (ionic.bundle.js:40804) also, error: [$rootscope...
Comments
Post a Comment