Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

params array #12

Closed
osben opened this issue May 4, 2020 · 3 comments
Closed

params array #12

osben opened this issue May 4, 2020 · 3 comments

Comments

@osben
Copy link

osben commented May 4, 2020

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x ] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:

Current behavior

const params = {brands: [1,2]};
this.http.get (url, {... {params: {... params}}});
URL?brands=1&brands = 2

Expected behavior

const params = {brands: [1,2]};
this.http.get (url, {... {params: {... params}}});
URL?brands=1

Minimal reproduction of the problem with instructions

const params = {brands: [1,2]};
this.http.get (url, {... {params: {... params}}});
URL?brands=1

What is the motivation / use case for changing the behavior?

Environment


Angular version: 8.2.14


Browser:
- [x ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
For Tooling issues:
- Node version: XX  10.21
- Platform:  Windows 

Others:
When I add an HttpCacheInterceptorModule to app.module.ts some of my requests stop working correctly,
namely params array cease to work correctly

"@angular/common": "~ 8.2.14",
example:

const params = {brands: [1,2]};
this.http.get (url, {... {params: {... params}}});
url?brands=1&brands=2

with HttpCacheInterceptorModule
url?brands=1
@osben
Copy link
Author

osben commented May 4, 2020

this bug occurs when HttpParams is used.

@itayod
Copy link
Collaborator

itayod commented May 4, 2020

Hi @osben I have fixed the bug and released a new version (1.1.5) could you please update the and validate it works?

@osben
Copy link
Author

osben commented May 4, 2020

i am happy. its work. great work

@osben osben closed this as completed May 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants