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
Post a Comment