29 lines
513 B
JavaScript
29 lines
513 B
JavaScript
(function() {
|
|
'use strict';
|
|
|
|
window.app.controller('UserController',
|
|
function($uibModal, userSvc, downloadSvc) {
|
|
var vm = this;
|
|
|
|
vm.users = userSvc.users;
|
|
|
|
vm.create = function() {
|
|
$uibModal.open({
|
|
template: '<user-create />',
|
|
backdrop: 'static'
|
|
});
|
|
}
|
|
|
|
vm.edit = function() {
|
|
$uibModal.open({
|
|
template: '<user-edit />',
|
|
backdrop: 'static'
|
|
});
|
|
}
|
|
|
|
vm.export = function() {
|
|
userSvc.exportUsers()
|
|
.success(downloadSvc.success);
|
|
}
|
|
});
|
|
})(); |