Add user management

This commit is contained in:
2016-09-23 15:12:46 -04:00
parent 9f50a4635c
commit 0b5dde065a
53 changed files with 1046 additions and 690 deletions
@@ -1,30 +1,28 @@
(function() {
'use strict';
window.app.controller('EditProfileController', EditProfileController);
window.app.controller('EditProfileController',
function($http, editProfileConfig, model) {
var vm = this;
EditProfileController.$inject = ['$http', 'editProfileConfig', 'model'];
function EditProfileController($http, editProfileConfig, model) {
var vm = this;
vm.profile = model;
vm.save = save;
vm.profile = model;
vm.save = save;
function save() {
vm.saving = true;
vm.errorMessage = null;
vm.success = false;
function save() {
vm.saving = true;
vm.errorMessage = null;
vm.success = false;
$http.post(editProfileConfig.saveUrl, vm.profile)
.success(function() {
vm.success = true;
})
.error(function(msg) {
vm.errorMessage = msg;
})
.finally(function() {
vm.saving = false;
});
}
}
$http.post(editProfileConfig.saveUrl, vm.profile)
.success(function() {
vm.success = true;
})
.error(function(msg) {
vm.errorMessage = msg;
})
.finally(function() {
vm.saving = false;
});
}
});
})();