Last active
September 30, 2015 19:22
-
-
Save caionorder/0d293d4277295835b6fc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.factory('Cupons', function($http, $q) { | |
var cupons = []; | |
return { | |
all: function(info) { | |
console.log(deferred); | |
cupons = $http({ | |
url: 'http://ofertasdahora.me/json/cupons/cupons/list', | |
method: 'GET', | |
params:{ | |
'cliente':info.id, | |
} | |
}); | |
return cupons; | |
}, | |
get: function(id) { | |
cupons = $http({ | |
url: 'http://ofertasdahora.me/json/cupons/cupons/list', | |
method: 'POST', | |
params: { | |
'id':id, | |
} | |
}); | |
return cupons; | |
} | |
}; | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment