angular-cn/packages
Jessica Janiuk 290ea57a93 fix(core): Access injected parent values using SelfSkip (#39464)
In ViewEngine, SelfSkip would navigate up the tree to get tokens from
the parent node, skipping the child. This restores that functionality in
Ivy. In ViewEngine, if a special token (e.g. ElementRef) was not found
in the NodeInjector tree, the ModuleInjector was also used to lookup
that token. While special tokens like ElementRef make sense only in a
context of a NodeInjector, we preserved ViewEngine logic for now to
avoid breaking changes.

We identified 4 scenarios related to @SkipSelf and special tokens where
ViewEngine behavior was incorrect and is likely due to bugs. In Ivy this
is implemented to provide a more intuitive API. The list of scenarios
can be found below.

1. When Injector is used in combination with @Host and @SkipSelf on the
first Component within a module and the injector is defined in the
module, ViewEngine will get the injector from the module. In Ivy, it
does not do this and throws instead.

2. When retrieving a @ViewContainerRef while @SkipSelf and @Host are
present, in ViewEngine, it throws an exception. In Ivy it returns the
host ViewContainerRef.

3. When retrieving a @ViewContainerRef on an embedded view and @SkipSelf
is present, in ViewEngine, the ref is null. In Ivy it returns the parent
ViewContainerRef.

4. When utilizing viewProviders and providers, a child component that is
nested within a parent component that has @SkipSelf on a viewProvider
value, if that provider is provided by the parent component's
viewProviders and providers, ViewEngine will return that parent's
viewProviders value, which violates how viewProviders' visibility should
work. In Ivy, it retrieves the value from providers, as it should.

These discrepancies all behave as they should in Ivy and are likely bugs
in ViewEngine.

PR Close #39464
2020-11-06 09:23:45 -08:00
..
animations docs: remove IE10 references from comments in the code (#39090) 2020-10-13 15:51:49 -07:00
bazel docs(bazel): Mention Alex Eagle's article on migration doc (#39507) 2020-11-02 13:34:35 -08:00
benchpress build: add wombot proxy for publish config for @angular/benchpress (#37752) 2020-06-25 17:08:18 -07:00
common fix(common): change the week-numbering year format from `r` -> `Y` (#39495) 2020-10-30 10:24:43 -07:00
compiler fix(compiler): skipping leading whitespace should not break placeholder source-spans (#39486) 2020-11-06 09:01:37 -08:00
compiler-cli fix(compiler-cli): do not drop non-Angular decorators when downleveling (#39577) 2020-11-06 09:21:51 -08:00
core fix(core): Access injected parent values using SelfSkip (#39464) 2020-11-06 09:23:45 -08:00
docs docs(di): fix typo in advanced di doc (#36634) 2020-05-01 09:50:28 -07:00
elements refactor(elements): simplify code after IE<11 support removal (#39265) 2020-10-14 14:11:22 -07:00
examples docs: update forwardRef example (#39519) 2020-11-02 11:40:17 -08:00
forms fix(forms): remove validators while cleaning up a control (#39234) 2020-11-04 10:58:24 -08:00
language-service refactor(language-service): Use compiler APIs in Ivy to get definitions for external resources (#39476) 2020-11-06 09:17:33 -08:00
localize fix(localize): render placeholder types in extracted XLIFF files (#39398) 2020-10-27 10:42:15 -07:00
misc/angular-in-memory-web-api feat(core): update reference and doc to change `async` to `waitAsync`. (#37583) 2020-08-03 12:54:13 -07:00
platform-browser fix(core): Store ICU state in `LView` rather than in `TView` (#39233) 2020-10-21 18:33:00 -07:00
platform-browser-dynamic feat(core): update reference and doc to change `async` to `waitAsync`. (#37583) 2020-08-03 12:54:13 -07:00
platform-server fix(platform-server): Resolve absolute URL from baseUrl (#39334) 2020-10-21 09:41:58 -07:00
private/testing build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
router fix(router): Ensure all outlets are used when commands have a prefix (#39456) 2020-10-30 16:23:03 -07: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 docs: remove IE10 references from comments in the code (#39090) 2020-10-13 15:51:49 -07:00
zone.js feat(zone.js): monkey patches queueMicrotask() (#38904) 2020-11-05 11:23:33 -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 docs: add doc reference to npm package readme (#33911) 2019-11-20 14:46:23 -08:00
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 build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
goog.d.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
license-banner.txt build: bump year (#34651) 2020-01-13 07:21:43 -08:00
system.d.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
tsconfig-build-no-strict.json refactor(core): ensure compatibility with typescript strict flag (#30993) 2019-07-18 14:21:25 -07:00
tsconfig-build.json refactor(core): ensure compatibility with typescript strict flag (#30993) 2019-07-18 14:21:25 -07:00
tsconfig-test.json refactor: fix typescript strict flag failures in all tests (#30993) 2019-07-18 14:21:26 -07:00
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