-
Notifications
You must be signed in to change notification settings - Fork 166
Open
Description
First, thank you for your example! I learned a lot from it :)
Now, I have a question, can I store the userRole in the localStorage?
In this example, when the user requested a $state, the loginService will do the getLoginData() function, if there is a token in the localStorage, the loginService will not init the userRole ,so the pendingStateChange will be inited. Which cause the the grandfather do the resolve to retrieve the userRole remotely.
So if I init the userRole to be public and store it in the localStorage, when user do some login action, I change the value of userRole in the localStorage. By this way, can I delete the resolve in the grandfather?Will it be unsafe if I delete the resolve?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels