angular-cn/goldens/public-api
Paul Gschwendtner 97dc85ba5e feat(core): support injection token as predicate in queries (#37506)
Currently Angular internally already handles `InjectionToken` as
predicates for queries. This commit exposes this as public API as
developers already relied on this functionality but currently use
workarounds to satisfy the type constraints (e.g. `as any`).

We intend to make this public as it's low-effort to support, and
it's a significant key part for the use of light-weight tokens as
described in the upcoming guide: https://github.com/angular/angular/pull/36144.

In concrete, applications might use injection tokens over classes
for both optional DI and queries, because otherwise such references
cause classes to be always retained. This was also an issue in View
Engine, but now with Ivy, this pattern became worse, as factories are
directly attached to retained classes (ultimately ending up in the
production bundle, while being unused).

More details in the light-weight token guide and in: https://github.com/angular/angular-cli/issues/16866.

Closes #21152. Related to #36144.

PR Close #37506
2020-06-11 13:21:11 -07:00
..
animations ci: move public-api goldens to goldens directory (#35768) 2020-03-10 20:58:39 -04:00
common fix(common): let `KeyValuePipe` accept type unions with `null` (#36093) 2020-03-24 14:41:41 -07:00
compiler-cli feat(compiler-cli): report error if undecorated class with Angular features is discovered (#36921) 2020-05-06 15:06:10 -07:00
core feat(core): support injection token as predicate in queries (#37506) 2020-06-11 13:21:11 -07:00
elements ci: move public-api goldens to goldens directory (#35768) 2020-03-10 20:58:39 -04:00
forms ci: move public-api goldens to goldens directory (#35768) 2020-03-10 20:58:39 -04:00
localize ci: move public-api goldens to goldens directory (#35768) 2020-03-10 20:58:39 -04:00
platform-browser ci: move public-api goldens to goldens directory (#35768) 2020-03-10 20:58:39 -04:00
platform-browser-dynamic ci: move public-api goldens to goldens directory (#35768) 2020-03-10 20:58:39 -04:00
platform-server ci: move public-api goldens to goldens directory (#35768) 2020-03-10 20:58:39 -04: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 docs(router): add docs for RouterLink inputs (#37018) 2020-05-18 14:55:41 -07:00
service-worker feat(service-worker): include `CacheQueryOptions` options in ngsw-config (#34663) 2020-05-01 09:44:07 -07:00
upgrade ci: move public-api goldens to goldens directory (#35768) 2020-03-10 20:58:39 -04:00
manage.js ci: move public-api goldens to goldens directory (#35768) 2020-03-10 20:58:39 -04:00