<a check-permission permissioncode="BILLING_MANAGE">Billing</a>
In above line directive name is check-permission and we want value of attribute permissioncode in directive.
Using below code we can get the value of attribute permissioncode:
app.directive('
checkPermission', function() {
return function(scope, element, attrs) {
attrs.$observe(' permissioncode', function(permission) {
alert(permission)
In above line directive name is check-permission and we want value of attribute permissioncode in directive.
Using below code we can get the value of attribute permissioncode:
app.directive('
return function(scope, element, attrs) {
attrs.$observe('
alert(permission)
});
}
});
}
});
No comments:
Post a Comment