290ea57a93
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 |
||
---|---|---|
.circleci | ||
.devcontainer | ||
.github | ||
.ng-dev | ||
.vscode | ||
.yarn | ||
aio | ||
dev-infra | ||
docs | ||
goldens | ||
integration | ||
modules | ||
packages | ||
scripts | ||
third_party | ||
tools | ||
.bazelignore | ||
.bazelrc | ||
.bazelversion | ||
.clang-format | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
.gitmessage | ||
.mailmap | ||
.nvmrc | ||
.pullapprove.yml | ||
.yarnrc | ||
BUILD.bazel | ||
CHANGELOG.md | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
LICENSE | ||
README.md | ||
WORKSPACE | ||
browser-providers.conf.js | ||
gulpfile.js | ||
karma-js.conf.js | ||
package.json | ||
test-events.js | ||
test-main.js | ||
tslint.json | ||
yarn.lock | ||
yarn.lock.readme.md |
README.md
Angular - One framework. Mobile & desktop.
Angular is a development platform for building mobile and desktop web applications
using Typescript/JavaScript and other languages.
Contributing Guidelines
·
Submit an Issue
·
Blog
Documentation
Get started with Angular, learn the fundamentals and explore advanced topics on our documentation website.
Advanced
Development Setup
Prerequisites
- Install Node.js which includes Node Package Manager
Setting Up a Project
Install the Angular CLI globally:
npm install -g @angular/cli
Create workspace:
ng new [PROJECT NAME]
Run the application:
cd [PROJECT NAME]
ng serve
Quickstart
Ecosystem
Changelog
Learn about the latest improvements.
Upgrading
Check out our upgrade guide to find out the best way to upgrade your project.
Contributing
Contributing Guidelines
Read through our contributing guidelines to learn about our submission process, coding rules and more.
Want to Help?
Want to file a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues in the hotlist: community-help.
Code of Conduct
Help us keep Angular open and inclusive. Please read and follow our Code of Conduct.
Community
Join the conversation and help the community.
Love Angular? Give our repo a star ⭐ ⬆️.