Blame view

app/views/login/login.service.js 645 Bytes
5c6477d3d   Rishav   Admin Acufuel set...
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
  (function() {
    'use strict';
  
    angular.module('inspinia')
        .service('LoginService', ['$rootScope', '$q', '$http', 'BE', LoginService])
  
     function LoginService($rootScope, $q, $http, BE) {
  
          this.loginUser = function(data) {
  
            var deferred = $q.defer();
            $http({
                method : 'POST',
                url : BE.url +'/account/registration',
                headers : {'Content-Type': 'application/x-www-form-urlencoded'},
                data : data
            })
            .success(function(result) {
                deferred.resolve(result);
            })
            return deferred.promise;
          }
     }
  
  })();