Skip to content
This repository has been archived by the owner on Aug 25, 2019. It is now read-only.

Latest commit

 

History

History

angular-permission

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

angular-permission

demo

click here

说明

一个基于angular的视图权限指令

依赖

  • angular

使用方式

html代码

<body ng-app="app" ng-controller="ctrl">
    <button has-permission="edit">权限按钮</button>
</body>

angular代码

var app = angular.module("app", ["ngPermission"]);
var data = ["add", "edit"];
app.config(["ngPermissionProvider", function(ngPermissionProvider) {
    ngPermissionProvider.setData(data);
}]);
app.controller("ctrl", ["$scope", function($scope) {
}]);