User profile editing and password

This commit is contained in:
2016-09-26 11:13:59 -04:00
parent 6789c1b3b5
commit 75b7c02979
54 changed files with 373 additions and 209 deletions
@@ -0,0 +1,32 @@
(function() {
window.app.factory("profileSvc",
[
"$http",
function($http) {
var profile = {};
loadProfile();
var svc = {
update: update,
profile: profile
};
return svc;
function loadProfile() {
$http.post("/Profile/Get")
.success(function(data) {
angular.copy(data, profile);
});
}
function update(updatedProfile) {
return $http.post("/Profile/Update", updatedProfile)
.success(function(data) {
angular.copy(data, profile);
});
}
}
]);
})();