how to set local storage and keep it after refreshing oage 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));
}