mapping
7 years ago
angular-chosen.directive.js
7 years ago
attributes.service.js
7 years ago
autodetect.directive.js
7 years ago
cascade.directive.js
7 years ago
contenteditable.directive.js
7 years ago
currency.service.js
7 years ago
droppable.directive.js
7 years ago
export.service.js
7 years ago
focusMeWhenEnabled.directive.js
7 years ago
googleCategoriesService.js
7 years ago
main.controller.js
7 years ago
styledInput.directive.js
7 years ago
template.service.js
7 years ago
tipsy.directive.js
7 years ago
wpHttp.service.js
7 years ago
template.service.js
19 lines
| 1 | GoogleMerchants.factory('templateService', ['$q', '$log', 'wpHttp', function($q, $log, wpHttp){ |
| 2 | |
| 3 | var getTemplate = function(templateId) { |
| 4 | var deferred = $q.defer(); |
| 5 | |
| 6 | wpHttp.get('templates/get&templateId='+ templateId).then(function(data){ |
| 7 | deferred.resolve(data); |
| 8 | }, function(msg, code){ |
| 9 | deferred.reject(msg,code); |
| 10 | $log.error('There was a problem getting the export'); |
| 11 | }); |
| 12 | |
| 13 | return deferred.promise; |
| 14 | }; |
| 15 | |
| 16 | return { |
| 17 | getTemplate: getTemplate |
| 18 | } |
| 19 | }]); |