I am new to AngularJS, and I am a little confused of how I can use angular-\"ui-router\" in the following scenario:
I am building a web application which consists of
I think you need a service that handle the authentication process (and its storage).
In this service you'll need some basic methods :
isAuthenticated()login()logout()This service should be injected in your controllers of each module :
service.isAuthenticated() method) . if not, redirect to /loginservice.login() methodA good and robust example for this behavior is the project angular-app and specifically its security module which is based over the awesome HTTP Auth Interceptor Module
Hope this helps