This patch is a final major refactor in styling Angular. This PR includes three main fixes: All temporary state taht is persisted between template style/class application and style/class application in host bindings is now removed. Removes the styling() and stylingApply() instructions. Introduces a "direct apply" mode that is used apply prop-based style/class in the event that there are no map-based bindings as well as property collisions. PR Close #32259 PR Close #32596
This commit is contained in:
@ -483,14 +483,11 @@ describe('compiler compliance', () => {
|
||||
vars: 2,
|
||||
template: function MyComponent_Template(rf,ctx){
|
||||
if (rf & 1) {
|
||||
$r3$.ɵɵelementStart(0, "div");
|
||||
$r3$.ɵɵstyling();
|
||||
$r3$.ɵɵelementEnd();
|
||||
$r3$.ɵɵelement(0, "div");
|
||||
}
|
||||
if (rf & 2) {
|
||||
$r3$.ɵɵstyleProp("background-color", ctx.color);
|
||||
$r3$.ɵɵclassProp("error", ctx.error);
|
||||
$r3$.ɵɵstylingApply();
|
||||
}
|
||||
},
|
||||
encapsulation: 2
|
||||
|
Reference in New Issue
Block a user