Blame view

app/partials/accountSetting/accountSetting.Service.js 798 Bytes
3a9f4472b   Rishav   Implement contact...
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
  (function(){
   'use strict';    
      angular.module('acufuel')
        .service('AccountSettingService', ['$rootScope', '$q', '$http', '$state', 'BASE_URL', AccountSettingService]);
  
        function AccountSettingService($rootScope, $q, $http, $state, BASE_URL) {        
  
          this.getProducts = function(data) {
  
            var deferred = $q.defer();
            $http({
                method : 'GET',
                url : BASE_URL.url +'/user/products',
                headers : {'Content-Type': 'application/json'},
            })
            .then(function (result){
                deferred.resolve(result.data);
            },function (result){
              //console.log(result.data)
                deferred.resolve(result.data);
            })
            return deferred.promise;
          }
  
      }
        
  })();