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

c++ - What's the differece between of link to a dynamic file and as a input object? -

javascript - Feed FileReader from server side files -

Android Unit Testing / Mockito: android.location.Location not mocked -