Blame view
app/partials/forgetPassword/forgetPassword.services.js
997 Bytes
4521c76c6
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
(function(){ 'use strict'; angular.module('acufuel') .service('forgetPasswordService', ['$rootScope', '$q', '$http', '$state', 'BASE_URL', 'AUTH_EVENTS', 'USER_ROLES', LoginService]); function LoginService($rootScope, $q, $http, $state, BASE_URL, AUTH_EVENTS, USER_ROLES) { var authService = {}, email = '', isAuthenticated = false; authService.forgetPasswordUser = function(data) { var deferred = $q.defer(); $http({ method : 'POST', url : BASE_URL.url +'/login', headers : {'Content-Type': 'application/x-www-form-urlencoded'}, data : data }) .then(function (result){ deferred.resolve(result.data); },function (result){ //console.log(result.data) deferred.resolve(result.data); }) return deferred.promise; } } })(); |