YouAndWeb_TwoToc
a2ecfb85282bb782ae96a40499c728d5c266f710
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
'use strict'; angular.module('dashboardApp') .controller('SettingsCtrl', function($scope, User, Auth) { $scope.errors = {}; $scope.changePassword = function(form) { $scope.submitted = true; if (form.$valid) { Auth.changePassword($scope.user.oldPassword, $scope.user.newPassword) .then(function() { $scope.message = 'Password successfully changed.'; }) .catch(function() { form.password.$setValidity('mongoose', false); $scope.errors.other = 'Incorrect password'; $scope.message = ''; }); } }; }); |
Commits for YouAndWeb_TwoTocclient/app/account/settings/settings.controller.js
Revision | Author | Commited | Message |
---|---|---|---|
a2ecfb ... | PTKDev | Fri 20 Nov, 2015 11:22:35 +0000 | TwoToc code |