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

fix($resource): pass options when binding default params #15160

Closed
wants to merge 3 commits into from

Conversation

gkalpak
Copy link
Member

@gkalpak gkalpak commented Sep 19, 2016

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Bug fix.

What is the current behavior? (You can also link to an open issue here)
Resource.bind(), which creates an new Resource class with the same properties except for the
additional bound default parameters, was not passing the original Resource class' options,
resulting in different behavior.

What is the new behavior (if this is a feature change)?
The options are passed when creating the new Resource class.

Does this PR introduce a breaking change?
No.

Please check if the PR fulfills these requirements

Other information:
This feature is undocumented. It might be a better idea to remove it altogether (although it does sounds useful). In any case, if we're keeping it, let's make it bug-free 😃

This PR also includes a couple of $resource refactorings that don't change the behavior.

`Resource.bind()`, which creates an new Resource class with the same propertiesexcept for the
additional bound default parameters, was not passing the original Resource class' `options`,
resulting in different behavior.
This commit fixes it by passing the `options` when creating the new Resource class.
@petebacondarwin
Copy link
Contributor

LGTM as soon as Travis is happy

@gkalpak gkalpak closed this in 8d4d3d5 Sep 21, 2016
@gkalpak gkalpak deleted the refactor-resource branch September 21, 2016 11:29
gkalpak added a commit that referenced this pull request Sep 21, 2016
petebacondarwin pushed a commit to petebacondarwin/angular.js that referenced this pull request Nov 21, 2016
petebacondarwin pushed a commit to petebacondarwin/angular.js that referenced this pull request Nov 21, 2016
petebacondarwin pushed a commit to petebacondarwin/angular.js that referenced this pull request Nov 21, 2016
petebacondarwin pushed a commit to petebacondarwin/angular.js that referenced this pull request Nov 21, 2016
petebacondarwin pushed a commit to petebacondarwin/angular.js that referenced this pull request Nov 21, 2016
petebacondarwin pushed a commit that referenced this pull request Nov 23, 2016
petebacondarwin pushed a commit that referenced this pull request Nov 24, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants