Authentication using Angular js

For the demo we require the following files.

So here are a few scenarios if the user open the page he is not logged in(you have to implement this logic) so he is redirected to login page. Then he press the login button to login and he is redirected to user page. Where he can logout (that logic should also be implemented by you.). After every 10 seconds the user is logged out (timeout) and is redirected to login page. I hope this code will help you understand the concept.

 

App.js http://www.heypasteit.com/clip/1X5J

user.html http://www.heypasteit.com/clip/1X5K

login.html http://www.heypasteit.com/clip/1X5L

Index.html http://www.heypasteit.com/clip/1X5M