ee8b8f52aa
This change changes the priority order of static styling. Current priority: ``` (least priority) - Static - Component - Directives - Template - Dynamic Binding - Component - Map/Interpolation - Property - Directives - Map/Interpolation - Property - Template - Map/Interpolation - Property (highest priority) ``` The issue with the above priority is this use case: ``` <div style="color: red;" directive-which-sets-color-blue> ``` In the above case the directive will win and the resulting color will be `blue`. However a small change of adding interpolation to the example like so. (Style interpolation is coming in https://github.com/angular/angular/pull/34202) ``` <div style="color: red; width: {{exp}}px" directive-which-sets-color-blue> ``` Changes the priority from static binding to interpolated binding which means now the resulting color is `red`. It is very surprising that adding an unrelated interpolation and style can change the `color` which was not changed. To fix that we need to make sure that the static values are associated with priority of the source (directive or template) where they were declared. The new resulting priority is: ``` (least priority) - Component - Static - Map/Interpolation - Property - Directives - Static - Map/Interpolation - Property - Template - Static - Map/Interpolation - Property (highest priority) ``` PR Close #34938 |
||
---|---|---|
.. | ||
animation_world | ||
core_all | ||
cyclic_import | ||
hello_world | ||
hello_world_i18n | ||
hello_world_r2 | ||
injection | ||
todo | ||
todo_i18n | ||
todo_r2 | ||
util | ||
README.md |
README.md
Bundle
js_expected_symbol_test
This folder contains tests which assert that most of the code is tree shaken away. This is asserted by keeping gold files of all symbols which are expected to be retained. When doing renaming it is often necessary to update the gold files, to do so use this commands:
yarn bazel run --config=ivy //packages/core/test/bundling/cyclic_import:symbol_test.accept
yarn bazel run --config=ivy //packages/core/test/bundling/hello_world:symbol_test.accept
yarn bazel run --config=ivy //packages/core/test/bundling/injection:symbol_test.accept
yarn bazel run --config=ivy //packages/core/test/bundling/todo:symbol_test.accept