Logout in ionic 2


#1

hey guys

I build an app the have as root page the login form and when user successful login it give him a specific role aw in the login page i disable the side menu but when he is in the home page i enable the side menu and this side menu just have a logout button so the login is successful done but i don’t have how to when press the logout button i should deal with also note that i save all the user data in local storage and what i really need that when user press on logout button it delete the username and password and return him to the login page
Sorry if i am not so clear but i am stuck on this issue for many days

Any help are appreciated
Regards


#2

It’d save you so much more stress, time and effort if you look into ajax. :wink:


#3

okay thank you :blush: i will take a look


#4

Anytime. Feel free to reach out if you have questions.