Im facing an issue regarding with the ionic login/lout development.
After login button click ,setting the userdetails in localstorage (localstorage.setItem()) and route to dashboard.
In dashboard im checking if data present in the localstorage or not, then display the login/logout button
But this isnt working properly, data set in the localstorage is fine.
but when i reach dashboard its still ‘login’ button
When i refresh the dashboard page this will change to ‘logout’ button
Same happening for logout (localstorage.clear()) function too
i am beginner can anyone help me out with this issue