angularjs - Saving $stateParams while refreshing a $state - UI-Router -


i'm using ui-router , have few stateparams in state, while refresh page stateparams going undefined. how can maintain stateparam when refresh.

you should store parameter state inside of localstorage.

cache.$inject = ['$localstorage', '$cookiestore', 'config', 'constant'];  export function cache($localstorage, $cookiestore, config: iappconfig, constant) {     return {            storestate: function (state) {             $localstorage.state = state;            }     } } 

this sample code written typescript.


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -