You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
HttpParams instantiation using fromObject option with number or boolean parameters does not convert them to string #42641
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: common/httpIssues related to HTTP and HTTP Client
The issue is caused by package @angular/common/http
Is this a regression?
No
Description
From Angular version 12, the HttpParamsOptions allows number and boolean types in fromObject, introduced with commit #40663
When a new HttpParams object is created using that option, then the parameters are not converted to string, so when using the get and getAll methods the value does not match the expected string | null type.
This causes type errors and tests failing.
Check this comment for more info about the fix: #42637 (comment)
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: common/httpIssues related to HTTP and HTTP Client
Activity
petebacondarwin commentedon Jun 24, 2021
@cexbrayat - do you want to take this one?
cexbrayat commentedon Jun 24, 2021
Sure, I'll take a look
fix(common): properly cast http param values to strings
angular-automatic-lock-bot commentedon Jun 4, 2022
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.