Reputation: 144
In an angularjs application, is it possible to use a different (index.html?) for login page and use another index.html page for rest of the pages in the application?
Upvotes: 0
Views: 46
Reputation: 11953
also you can use ng-show
and ng-hide
<div ng-show="userLoggedIn">
<login page html>
</div>
<div ng-hide="!userLoggedIn">
<regular page html>
</div>
Upvotes: 0
Reputation: 507
It is possible, however you can also use ng-if
on the login html code and the regular html code:
<div ng-if="userLoggedIn">
<login page html>
</div>
<div ng-if="!userLoggedIn">
<regular page html>
</div>
Which will show one of the divs according to what is set as $scope.userLoggedIn in your main controller.
Upvotes: 1