blob: c1bc8f5d075b785c57d3a2dd8e6222828e9ccbce [file] [log] [blame]
Matteo Scandolo1dc8f3f2016-04-13 10:19:55 -07001(function() {
2 'use strict';
Matteo Scandoloc7987cd2016-04-12 11:38:40 -07003
Matteo Scandolo1dc8f3f2016-04-13 10:19:55 -07004 angular.module('{{ngModule}}')
5 {{#each resources}}
Matteo Scandolo582cc812016-04-13 17:23:28 -07006 /**
7 * @ngdoc service
8 * @name {{../ngModule}}.{{name}}
9 * @description Angular resource to fetch {{param.href}}
10 **/
Matteo Scandolo1dc8f3f2016-04-13 10:19:55 -070011 .service('{{name}}', function($resource){
Matteo Scandolo67e79cb2016-04-29 09:14:58 -070012 return $resource('{{param.href}}'{{#if param.name}}, { {{param.name}}: '@id' }, {
13 update: { method: 'PUT' }
14 }{{/if}});
Matteo Scandolo1dc8f3f2016-04-13 10:19:55 -070015 })
16 {{/each}}
17})();