I am developing a mobile hybrid application using Angular and Ionic.
I have a conditional login based on a user role. During login, I get the role and based on the role that I view on the role-based page. To do this, I save my role data in LocalStorage and after logging in I check the same.
But I can’t process it $urlRouterProvider.otherwise('app/user');conditionally.
Because if I log in as user2, I closed my application. Again, if I open my application, the page should be different, but it moves on the page $urlRouterProvider.otherwise.
I tried this link but could not solve my problem.
source
share