angularjs切换路由,清除localstorage本地存储

angularjs切换路由时,清除localstorage本地存储

this.$rootScope.$on('$stateChangeStart', function() {
     
    localStorage.removeItem('存储名称');
});

你可能感兴趣的:(angularjs,angularjs)