This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix($resource): pass all extra, owned properties as params
Previously, a property would not be passed as query param, if `Object.prototype` had a property with the same name. Fixes #14866 Closes #14867 BREAKING CHANGE: All owned properties of the `params` object that are not used to replace URL params, will be passed to `$http` as `config.params` (to be used as query parameters in the URL), even if `Object.prototype` has a property with same name. E.g.: Before: ```js var Foo = $resource('/foo/:id'); Foo.get({id: 42, bar: 'baz', toString: 'hmm'}); // URL: /foo/42?bar=baz // Note that `toString` is _not_ included in the query, // because `Object.prototype.toString` is defined :( ``` After: ```js var Foo = $resource('/foo/:id'); Foo.get({id: 42, bar: 'baz', toString: 'hmm'}); // URL: /foo/42?bar=baz&toString=hmm // Note that `toString` _is_ included in the query, as expected :) ```
- Loading branch information