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

Hi i found this problem when i use HttpParams.append #28227

Closed
luocongqiu opened this issue Jan 18, 2019 · 3 comments
Closed

Hi i found this problem when i use HttpParams.append #28227

luocongqiu opened this issue Jan 18, 2019 · 3 comments

Comments

@luocongqiu
Copy link

🐞 bug report

Affected Package

Unfortunately, I cannot tell precisely, which package of @angular is causing the behavior.

Is this a regression?

the previous version also had the same problem

Description


        let params = new HttpParams();
        params = params.append('status', '1');
        params = params.append('status', '2');
        console.info(params.get('status'));
        params = params.set('name', 'test');
        params = params.append('status', '3');
        console.info(params.toString());

log


1
status=1&status=2&status=1&status=2&status=3&name=test

status=1&status=2 will repeat

🔬 Minimal Reproduction

🔥 Exception or Error

See Description

🌍 Your Environment

Angular Version:


     "@angular/common": "~7.2.0",
    "@angular/compiler": "~7.2.0",
    "@angular/core": "~7.2.0",
    "@angular/forms": "~7.2.0",
    "@angular/platform-browser": "~7.2.0",
    "@angular/platform-browser-dynamic": "~7.2.0",
    "@angular/router": "~7.2.0",

Anything else relevant?
no

@trotyl
Copy link
Contributor

trotyl commented Jan 18, 2019

Duplicate of #20430

@AndrewKushnir
Copy link
Contributor

Hi @luocongqiu, I'm closing this ticket as a duplicate of #20430 (thanks @trotyl for the link). Please refer to issue #20430 for additional information and updates. Thank you.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants