angular.js - angular 登陆验证
大家讲道理
大家讲道理 2017-05-15 17:07:29
0
2
559

在controller中读取session
然后判断是否登陆,但是这样有个问题 , 就是执行判断的时候页面已经加载一部分, 能看到内容,然后才跳转到登陆页面.
有没有什么办法是直接跳到登陆页面的,
在页面加载之前就是判断

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(2)
淡淡烟草味

Reading the session or cookie to determine the login can be placed in the run method of the corresponding module, so that you will not see the page jump after loading part of it

漂亮男人

To completely prevent the content from being visible, you need to let the backend do it. When entering the page, go to the verification logic of the backend first. If you are logged in after the backend verification, then enter the page directly, otherwise go to the login page. .

The front-end cannot limit the URL entered by the user, and static resources must be loaded before they can be judged. . .

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!