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

DO_NOT_MERGE feat($resource): Make stripping of trailing slashes configurable. #7064

Merged
merged 1 commit into from
Apr 9, 2014

Conversation

mgol
Copy link
Member

@mgol mgol commented Apr 9, 2014

This is only to run tests on Travis before merging #5560 to master.

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
    });
@mgol mgol closed this Apr 9, 2014
@mgol mgol deleted the pr-5560 branch April 9, 2014 22:40
@mgol mgol merged commit 3878be5 into angular:master Apr 9, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants