b50283ed67
In the @Component decorator, the 'host' field is an object which represents host bindings. The type of this field is complex, but is generally of the form {[key: string]: string}. Several different kinds of bindings can be specified, depending on the structure of the key. For example: ``` @Component({ host: {'[prop]': 'someExpr'} }) ``` will bind an expression 'someExpr' to the property 'prop'. This is known to be a property binding because of the square brackets in the binding key. If the binding key is a plain string (no brackets or parentheses), then it is known as an attribute binding. In this case, the right-hand side is not interpreted as an expression, but is instead a constant string. There is no actual requirement that at build time, these constant strings are known to the compiler, but this was previously enforced as a side effect of requiring the binding expressions for property and event bindings to be statically known (as they need to be parsed). This commit breaks that relationship and allows the attribute bindings to be dynamic. In the case that they are dynamic, the references to the dynamic values are reflected into the Ivy instructions for attribute bindings. PR Close #29033 |
||
---|---|---|
.. | ||
animations | ||
bazel | ||
benchpress | ||
common | ||
compiler | ||
compiler-cli | ||
core | ||
docs | ||
elements | ||
examples | ||
forms | ||
http | ||
language-service | ||
platform-browser | ||
platform-browser-dynamic | ||
platform-server | ||
platform-webworker | ||
platform-webworker-dynamic | ||
private/testing | ||
router | ||
service-worker | ||
upgrade | ||
BUILD.bazel | ||
README.md | ||
empty.ts | ||
goog.d.ts | ||
license-banner.txt | ||
system.d.ts | ||
tsconfig-build.json | ||
tsconfig-test.json | ||
tsconfig.json | ||
types.d.ts |
README.md
Angular
The sources for this package are in the main Angular repo. Please file issues and pull requests against that repo.
License: MIT