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

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -