refactor(ivy): migrate all host-specific styling instructions to element-level styling instructions (#30336)
This patch removes all host-specific styling instructions in favor of using element-level instructions instead. Because of the previous patches that made sure `select(n)` worked between styling calls, all host level instructions are not needed anymore. This patch changes each of those instruction calls to use any of the `elementStyling*`, `elementStyle*` and `elementClass*` styling instructions instead. PR Close #30336
This commit is contained in:

committed by
Alex Rickabaugh

parent
452f121486
commit
c016e2c4ec
@ -5,7 +5,7 @@
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
import {Directive, DoCheck, Input, ɵRenderFlags, ɵɵdefineDirective, ɵɵelementHostClassMap, ɵɵelementHostStyling, ɵɵelementHostStylingApply} from '@angular/core';
|
||||
import {Directive, DoCheck, Input, ɵRenderFlags, ɵɵdefineDirective, ɵɵelementClassMap, ɵɵelementStyling, ɵɵelementStylingApply} from '@angular/core';
|
||||
|
||||
import {NgClassImpl, NgClassImplProvider} from './ng_class_impl';
|
||||
|
||||
@ -35,11 +35,11 @@ export const ngClassDirectiveDef__POST_R3__ = ɵɵdefineDirective({
|
||||
factory: () => {},
|
||||
hostBindings: function(rf: ɵRenderFlags, ctx: any, elIndex: number) {
|
||||
if (rf & ɵRenderFlags.Create) {
|
||||
ɵɵelementHostStyling();
|
||||
ɵɵelementStyling();
|
||||
}
|
||||
if (rf & ɵRenderFlags.Update) {
|
||||
ɵɵelementHostClassMap(ctx.getValue());
|
||||
ɵɵelementHostStylingApply();
|
||||
ɵɵelementClassMap(ctx.getValue());
|
||||
ɵɵelementStylingApply();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -5,7 +5,7 @@
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
import {Directive, DoCheck, Input, ɵRenderFlags, ɵɵdefineDirective, ɵɵelementHostStyleMap, ɵɵelementHostStyling, ɵɵelementHostStylingApply} from '@angular/core';
|
||||
import {Directive, DoCheck, Input, ɵRenderFlags, ɵɵdefineDirective, ɵɵelementStyleMap, ɵɵelementStyling, ɵɵelementStylingApply} from '@angular/core';
|
||||
|
||||
import {NgStyleImpl, NgStyleImplProvider} from './ng_style_impl';
|
||||
|
||||
@ -35,11 +35,11 @@ export const ngStyleDirectiveDef__POST_R3__ = ɵɵdefineDirective({
|
||||
factory: () => {},
|
||||
hostBindings: function(rf: ɵRenderFlags, ctx: any, elIndex: number) {
|
||||
if (rf & ɵRenderFlags.Create) {
|
||||
ɵɵelementHostStyling();
|
||||
ɵɵelementStyling();
|
||||
}
|
||||
if (rf & ɵRenderFlags.Update) {
|
||||
ɵɵelementHostStyleMap(ctx.getValue());
|
||||
ɵɵelementHostStylingApply();
|
||||
ɵɵelementStyleMap(ctx.getValue());
|
||||
ɵɵelementStylingApply();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user