Issue
Its possible to access a login page, outside the structure of single page application? I have this code:
$routeProvider.when('/login', {
templateUrl: 'partials/login.html',
controller: 'LoginController'
});
$routeProvider.when('/dashboard', {
templateUrl: 'partials/dashboard.html',
controller: 'DashboardController'
});
Dashboard is inside the structure of single page application, using the template of my index.html, but my login page should be a external page, that not use the index.html as a template…
is that possible using ngRoute?
Solution
The login page should be external as you said, so we have to put it outside of main app, for that we just have:
- login app
- main app
benefits of make it external app are:
- the login not related to your main app it’s just for authentication
- the login app not include a lot of states max 2 state it’s just login form or forget password
- once users use
login app
to sign into yourmain app
not more
Answered By – Maher
Answer Checked By – Cary Denson (AngularFixing Admin)