'use strict';

require('angular');
require('angular-resource');

angular.module('swaggedAngularResources', ['ngResource'])
.config(function($resourceProvider) {
  $resourceProvider.defaults.stripTrailingSlashes = false;
})
{{#each resourceOperations}}
.{{../angularProviderType}}('{{@key}}{{../angularProviderSuffix}}', function() {
  this.$get = function($resource, apiUrl) {
    return $resource(null, null, {
      {{#each this}}
      {{nickname}}: {
        method: '{{action}}',
        url: apiUrl + '{{path}}',
        {{#if pathParameters}}
        params: {
          {{#each pathParameters}}
          '{{name}}': '@{{name}}',
          {{/each}}
        },
        {{/if}}
        {{#isQuery}}
        isArray: true,
        {{/isQuery}}
      },
      {{/each}}
    });
  };
})
{{/each}};

angular.module('swaggedAngularResources', ['ngResource'])
.config(function($resourceProvider) {
  $resourceProvider.defaults.stripTrailingSlashes = false;
})
{{#each resourceOperations}}
.{{../angularProviderType}}('{{@key}}{{../angularProviderSuffix}}', function() {
  this.$get = function($resource, apiUrl) {
    return $resource(null, null, {
      {{#each this}}
      {{nickname}}: {
        method: '{{action}}',
        url: apiUrl + '{{path}}',
        {{#if pathParameters}}
        params: {
          {{#each pathParameters}}
          '{{name}}': '@{{name}}',
          {{/each}}
        },
        {{/if}}
        {{#isQuery}}
        isArray: true,
        {{/isQuery}}
      },
      {{/each}}
    });
  };
})
{{/each}};

Remove browserify statements from template
Remove browserify statements from template
