Login Form for Angularjs

Asked

Viewed 220 times

1

Guys, I’m starting from Angularjs and I have the following question:

I have an HTML page index.html in it I load all the project scripts and start the app. Inside it tbem I have an ng-view where my other views are loaded which are my internal pages.

The fact is that my application is always started by index.html, and now I want to build a login page that will be independent and that should be started before in index.html. Only when the user successfully logs in will index.html be loaded.

Today if I add login as a normal view it opens inside my index page in ng-view and it’s not what I want.

How can I fix this?

  • Let me get this straight. Your login page is a full page, not a view. You want to go to it when the user clicks on a button (for example), overwriting the entire page index.html for her? And she’s having doubts about how to do it at Angular?

  • Not when you click a button. I want the first page to be the login, and if it passes there yes it will have access to index.html (which is a full page that loads the views within itself)

  • Create a div outside the ng-view associated with the login controller. This div tever will stay on top of all the other elements of the page, covering everything. But it is not recommended at all, since with commands in the browser console it is possible to "skip" the login and access the rest of the page.

  • Any return on that ? I also have doubts.

  • You can also have a module for the login and another for the application, so it would be easy to have a login page with a different face of the application page.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.