Add user management
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
window.app.directive('userList', function () {
|
||||
return {
|
||||
scope: { "users": "=" },
|
||||
templateUrl: '/user/template/userList.tmpl.cshtml',
|
||||
controller: controller,
|
||||
controllerAs: 'vm'
|
||||
}
|
||||
});
|
||||
|
||||
controller.$inject = ['$scope', '$uibModal'];
|
||||
function controller($scope, $uibModal) {
|
||||
var vm = this;
|
||||
|
||||
vm.users = $scope.users;
|
||||
vm.edit = edit;
|
||||
|
||||
function edit(user) {
|
||||
$uibModal.open({
|
||||
template: '<user-edit user="user" />',
|
||||
scope: angular.extend($scope.$new(true), { user: user })
|
||||
});
|
||||
}
|
||||
}
|
||||
})();
|
||||
Reference in New Issue
Block a user