Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Commit

Permalink
feat($resource): Make stripping of trailing slashes configurable.
Browse files Browse the repository at this point in the history
First, this now uses a flat object configuration, similar to
`$httpBackend`.  This should make configuring this provider much more
familiar.

This adds a fourth optional argument to the `$resource()` constructor,
supporting overriding global `$resourceProvider` configuration.

Now, both of these ways of configuring this is supported:

    app.config(function($resourceProvider) {
      $resourceProvider.defaults.stripTrailingSlashes = false;
    });

or per instance:

    var CreditCard = $resource('/some/:url/', ..., ..., {
        stripTrailingSlashes: false
    });
  • Loading branch information
nvie authored and mgol committed Apr 9, 2014
1 parent acfcbdf commit 3878be5
Show file tree
Hide file tree
Showing 2 changed files with 320 additions and 235 deletions.
Loading

0 comments on commit 3878be5

Please sign in to comment.