Blame view
app/partials/forgetPassword/forgetPassword.controller.js
776 Bytes
4521c76c6
|
1 2 3 4 5 |
(function() { 'use strict' angular.module('acufuel') |
5fd0d0f40
|
6 |
.controller('forgetPasswordController', [ '$scope', '$state', 'forgetPasswordService', forgetPasswordController]); |
4521c76c6
|
7 |
|
5fd0d0f40
|
8 9 10 11 12 13 14 15 16 17 18 19 |
function forgetPasswordController($scope, $state, forgetPasswordService) { $scope.forgetPassword = function(email) { forgetPasswordService.recoverpassword(email).then(function(result){ if(typeof result == 'object') { toastr.info("Password generated successfully. Please check your email for new password"); localStorage.setItem('requiredChangePwd', "Y"); $state.go('login'); } else { toastr.info("Error in generating password"); } }) |
4521c76c6
|
20 21 22 |
} } })(); |