angular.js - Can you tell me how to arrange the display of authorized login information on a single page made with Angular?
phpcn_u1582
phpcn_u1582 2017-05-15 17:01:25
0
2
551

How to do this idea. Unlike those multi-page jumps. While jumping, various refresh displays are also displayed.

How to verify and display the session permissions on a single page.

phpcn_u1582
phpcn_u1582

reply all(2)
Peter_Zhu

You use ajax to access an interface for checking login on the server, and then get the user information by the way, save the user information in a rootscope variable, and then judge this variable in the template to display please log in, or user name, avatar, etc. information. This is basically the idea.

淡淡烟草味

If the front-end and back-end are separated, the backend will definitely provide you with relevant interfaces. You can store the user session identifier returned by the backend, such as token, when the login is successful, and verify whether the token is used when doing other related interactions with the backend. Expiration, whether there are permissions, etc., seal the verification function into the service for public use.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template