E
E
e_asphyx2016-01-21 12:11:16
Angular
e_asphyx, 2016-01-21 12:11:16

What is the best way to handle login in Angular 2?

Unfortunately, I have very little front-end experience, with the exception of Backbone.js. Now there is a need for Angular2.
In short, the structure is as follows: in the "not logged in" mode, we always show the same page (and the routing redirects to it), which contains the registration form and the login form in the modal dialog. In the "logged in" mode, there are several sections containing the same top panel with a custom menu.
I looked at the examples, understood how the component works, but did not understand at all how to deal with the login. Where is session state stored? In what object? How do components access it? How to connect routing and this state? How many components should there be? I'm a little confused and don't know where to start. Thank you.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question