angular-docs-cn/goldens/public-api
cexbrayat 91cdc11aa0 fix(common): allow number or boolean as http params (#40663)
This change fixes an incompatibility between the old `@angular/http` package
and its successor (`@angular/common/http`) by re-introducing the types that were supported before.

It now allows to use number and boolean directly as HTTP params, instead of having to convert it to string first.

Before:

    this.http.get('/api/config', { params: { page: `${page}` } });

After:

    this.http.get('/api/config', { params: { page }});

`HttpParams` has also been updated to have most of its methods accept number or boolean values.

Fixes #23856

BREAKING CHANGE:

The methods of the `HttpParams` class now accept `string | number | boolean`
instead of `string` for the value of a parameter.
If you extended this class in your application,
you'll have to update the signatures of your methods to reflect these changes.

PR Close #40663
2021-02-26 12:03:50 -08:00
..
animations ci: move public-api goldens to goldens directory (#35768) 2020-03-10 20:58:39 -04:00
common fix(common): allow number or boolean as http params (#40663) 2021-02-26 12:03:50 -08:00
compiler-cli refactor(compiler-cli): error on cyclic imports in partial compilation (#40782) 2021-02-17 06:53:38 -08:00
core fix(core): allow EmbeddedViewRef context to be updated (#40360) 2021-02-23 08:14:01 -08:00
elements feat(compiler-cli): add support for TypeScript 4.0 (#38076) 2020-08-24 13:06:59 -07:00
forms feat(forms): add `emitEvent` option for AbstractControl-based class methods (#31031) 2021-02-16 08:42:08 -08:00
localize ci: move public-api goldens to goldens directory (#35768) 2020-03-10 20:58:39 -04:00
platform-browser feat(animations): add support for disabling animations through BrowserAnimationsModule.withConfig (#40731) 2021-02-24 15:08:27 -08:00
platform-browser-dynamic ci: move public-api goldens to goldens directory (#35768) 2020-03-10 20:58:39 -04:00
platform-server feat(platform-server): allow shimming the global env sooner (#40559) 2021-02-12 08:55:25 -08:00
platform-webworker ci: move public-api goldens to goldens directory (#35768) 2020-03-10 20:58:39 -04:00
platform-webworker-dynamic ci: move public-api goldens to goldens directory (#35768) 2020-03-10 20:58:39 -04:00
router feat(router): Add more find-tuned control in `routerLinkActiveOptions` (#40303) 2021-02-24 15:32:05 -08:00
service-worker feat(service-worker): add the option to prefer network for navigation requests (#38565) 2020-09-22 09:29:20 -07:00
upgrade fix(upgrade): fix HMR for hybrid applications (#40045) 2020-12-10 13:40:53 -08:00
manage.js ci: move public-api goldens to goldens directory (#35768) 2020-03-10 20:58:39 -04:00