Matteo Scandolo | 1dc8f3f | 2016-04-13 10:19:55 -0700 | [diff] [blame] | 1 | (function() { |
| 2 | 'use strict'; |
Matteo Scandolo | c7987cd | 2016-04-12 11:38:40 -0700 | [diff] [blame] | 3 | |
Matteo Scandolo | 1dc8f3f | 2016-04-13 10:19:55 -0700 | [diff] [blame] | 4 | angular.module('{{ngModule}}') |
| 5 | {{#each resources}} |
Matteo Scandolo | 582cc81 | 2016-04-13 17:23:28 -0700 | [diff] [blame] | 6 | /** |
| 7 | * @ngdoc service |
| 8 | * @name {{../ngModule}}.{{name}} |
| 9 | * @description Angular resource to fetch {{param.href}} |
| 10 | **/ |
Matteo Scandolo | 1dc8f3f | 2016-04-13 10:19:55 -0700 | [diff] [blame] | 11 | .service('{{name}}', function($resource){ |
Matteo Scandolo | 67e79cb | 2016-04-29 09:14:58 -0700 | [diff] [blame] | 12 | return $resource('{{param.href}}'{{#if param.name}}, { {{param.name}}: '@id' }, { |
| 13 | update: { method: 'PUT' } |
| 14 | }{{/if}}); |
Matteo Scandolo | 1dc8f3f | 2016-04-13 10:19:55 -0700 | [diff] [blame] | 15 | }) |
| 16 | {{/each}} |
| 17 | })(); |