before refresh how to get localstorage value javascript code example
Example: jq storage object on refresh
if(!localStorage.getItem('initData') || JSON.parse(localStorage.getItem('initData')).length === 0){
$window.localStorage.setItem('initData', JSON.stringify($scope.initData));
}