Issue
I am developing an ionic app with firebase login .It has a sidemenu with pages when they click the sidemenu link , i want the user to be redirected automatically to login page if they are not logged in .
Any help would be greatly appreciated
Solution
If you are using ionic 1. Write a function in your controller which would check the state of your user. i.e Whether logged in or not and call the function whenever the user clicks on the side links. If logged in then you can do a $state.go('stateName of the link') else you can do a $state.go('your login state name').
Answered By - Bala Abhinav
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.