3 angular.module('dashboardApp')
4 .controller('SettingsCtrl', function($scope, User, Auth) {
7 $scope.changePassword = function(form) {
8 $scope.submitted = true;
10 Auth.changePassword($scope.user.oldPassword, $scope.user.newPassword)
12 $scope.message = 'Password successfully changed.';
15 form.password.$setValidity('mongoose', false);
16 $scope.errors.other = 'Incorrect password';