angular-docs-cn/packages
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 fix(animations): error when setting position before starting animation (#28255) 2021-02-19 12:09:02 -08:00
bazel test(bazel): use bazel runfiles helper for resolving file names (#40955) 2021-02-23 10:38:09 -08:00
benchpress fix(dev-infra): update type castings for JSON.parse usage (#40710) 2021-02-09 10:48:43 -08:00
common fix(common): allow number or boolean as http params (#40663) 2021-02-26 12:03:50 -08:00
compiler fix(compiler): ensure JIT compilation of ɵɵngDeclarePipe() works (#40929) 2021-02-24 15:07:08 -08:00
compiler-cli fix(ngcc): do not fail hard when a format-path points to a non-existing or empty file (#40985) 2021-02-26 08:26:33 -08:00
core feat(router): Add more find-tuned control in `routerLinkActiveOptions` (#40303) 2021-02-24 15:32:05 -08:00
docs
elements fix(elements): update type castings for JSON.parse usage (#40710) 2021-02-09 10:48:43 -08:00
examples docs: improve examples, description of PipeTransform (#40863) 2021-02-23 13:15:44 -08:00
forms docs(forms): add array example to get method (#41008) 2021-02-26 08:24:22 -08:00
language-service fix(language-service): use single entry point for Ivy and View Engine (#40967) 2021-02-24 15:05:44 -08:00
localize test(localize): ensure tests pass on Windows (#40952) 2021-02-24 14:27:07 -08:00
misc/angular-in-memory-web-api docs: remove duplicated the (#40434) 2021-01-14 11:33:57 -08: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 docs: update links to use HTTPS as protocol (#39718) 2020-11-20 12:52:16 -08:00
platform-server feat(platform-server): allow shimming the global env sooner (#40559) 2021-02-12 08:55:25 -08:00
private/testing build: update .bazelversion (#40579) 2021-01-26 11:35:54 -08:00
router feat(router): Add more find-tuned control in `routerLinkActiveOptions` (#40303) 2021-02-24 15:32:05 -08:00
service-worker fix(service-worker): update type castings for JSON.parse usage (#40710) 2021-02-09 10:48:43 -08:00
upgrade fix(upgrade): fix HMR for hybrid applications (#40045) 2020-12-10 13:40:53 -08:00
zone.js feat(core): drop support for zone.js 0.10.x (#40823) 2021-02-24 07:58:29 -08:00
BUILD.bazel build: replace @types/trusted-types dep with minimal type defs (#39211) 2020-10-15 09:08:00 -07:00
README.md
circular-deps-test.conf.js fix(platform-webworker): remove platform-webworker and platform-webworker-dynamic (#38846) 2020-09-30 09:13:59 -04:00
empty.ts
goog.d.ts
license-banner.txt docs: update year (#40925) 2021-02-22 12:37:40 -08:00
system.d.ts
tsconfig-build-no-strict.json
tsconfig-build.json
tsconfig-test.json
tsconfig.json fix(platform-webworker): remove platform-webworker and platform-webworker-dynamic (#38846) 2020-09-30 09:13:59 -04:00
types.d.ts build: replace @types/trusted-types dep with minimal type defs (#39211) 2020-10-15 09:08:00 -07:00

README.md

Angular

The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.

Usage information and reference details can be found in Angular documentation.

License: MIT