angular.js - angularjs permissions issue
習慣沉默
習慣沉默 2017-05-15 17:10:42
0
1
589

In the angularjs project, some functions require logging in to access. Now I can only control whether the user is logged in when clicking on the navigation. If the user is accessed directly using a link, I cannot determine whether the user is logged in. Here’s my method

$scope.login = function(){
    $scope.unlogin = false;
    //登录操作
}
$scope.login = function(){
    $scope.unlogin = true;
    //退出操作
}
<a ng-if="unlogin" ui-sref="login">我的收藏</a>
<a ng-if="!unlogin" ui-sref="myData">我的收藏</a>

To achieve this, users can check whether they are logged in by directly accessing the link. What should be done?

習慣沉默
習慣沉默

reply all(1)
刘奇

Successful login, save a cookie, and then determine the cookie

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