When I logged in, I stored the username in localStorage and wanted to verify the permissions based on localStorage information in stateChangeStart. However, I injected $localStorage in the run method and could not get the value of $localStorage. The page would report an error, $localStorage As undefined, what's going on?
localStorage is a property under window, not angularJS. So there is no need to inject it, just use it directly
For details, please refer to:
https://developer.mozilla.org...