/**
 * Alerts Controller
 */

angular
    .module('RDash')
    .controller('changePasswordCtrl', ['$scope', 'User', changePasswordCtrl]);

function changePasswordCtrl($scope, User) {

    console.log("changePasswordCtrl");

    $scope.submitForm = function(password) {
        User.passwordUpdate({password: password});
        console.log('updated');
    }

}
/**
 * Alerts Controller
 */

angular
    .module('RDash')
    .controller('changePasswordCtrl', ['$scope', 'User', 'notificationService', changePasswordCtrl]);

function changePasswordCtrl($scope, User, notificationService) {

    console.log("changePasswordCtrl");

    $scope.submitForm = function(password) {
        User.passwordUpdate({password: password}, function() {
                notificationService.success('Password is successfully changed!');
            }, function() {
                notificationService.error('Password could not be changed!');
            });
    }

}
Add notification for password change
Add notification for password change
