a42057d0f8
Recently it was made possible to have a directive without selector, which are referred to as abstract directives. Such directives should not be registered in an NgModule, but can still contain decorators for inputs, outputs, queries, etc. The information from these decorators and the `@Directive()` decorator itself needs to be registered with the central `MetadataRegistry` so that other areas of the compiler can request information about a given directive, an example of which is the template type checker that needs to know about the inputs and outputs of directives. Prior to this change, however, abstract directives would only register themselves with the `MetadataRegistry` as being an abstract directive, without all of its other metadata like inputs and outputs. This meant that the template type checker was unable to resolve the inputs and outputs of these abstract directives, therefore failing to check them correctly. The typical error would be that some property does not exist on a DOM element, whereas said property should have been bound to the abstract directive's input. This commit fixes the problem by always registering the metadata of a directive or component with the `MetadataRegistry`. Tests have been added to ensure abstract directives are handled correctly in the template type checker, together with tests to verify the form of abstract directives in declaration files. Fixes #30080 PR Close #33131 |
||
---|---|---|
.circleci | ||
.devcontainer | ||
.github | ||
.vscode | ||
aio | ||
docs | ||
integration | ||
modules | ||
packages | ||
scripts | ||
third_party | ||
tools | ||
.bazelignore | ||
.bazelrc | ||
.clang-format | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
.mailmap | ||
.nvmrc | ||
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 | ||
protractor-perf.conf.js | ||
renovate.json | ||
shims_for_IE.js | ||
test-events.js | ||
test-main.js | ||
tslint.json | ||
yarn.lock | ||
yarn.lock.readme.md |
README.md
Angular
Angular is a development platform for building mobile and desktop web applications using TypeScript/JavaScript and other languages.
Quickstart
Changelog
Learn about the latest improvements.
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.