feat(ivy): convert [ngStyle] and [ngClass] to use ivy styling bindings (#28711)
Prior to this fix, both the `NgStyle` and `NgClass` directives made use of `Renderer2` and this dependency raised issues for future versions of Angular that cannot inject it. This patch ensures that there are two versions of both directives: one for the VE and another for Ivy. Jira Issue: FW-882 PR Close #28711
This commit is contained in:

committed by
Igor Minar

parent
d0e81eb593
commit
cfb2d176f8
30
tools/public_api_guard/common/common.d.ts
vendored
30
tools/public_api_guard/common/common.d.ts
vendored
@ -207,15 +207,24 @@ export declare class LowerCasePipe implements PipeTransform {
|
||||
transform(value: string): string;
|
||||
}
|
||||
|
||||
export declare class NgClass implements DoCheck {
|
||||
export declare class NgClass extends NgClassBase implements DoCheck {
|
||||
klass: string;
|
||||
ngClass: string | string[] | Set<string> | {
|
||||
[klass: string]: any;
|
||||
};
|
||||
constructor(_iterableDiffers: IterableDiffers, _keyValueDiffers: KeyValueDiffers, _ngEl: ElementRef, _renderer: Renderer2);
|
||||
constructor(delegate: NgClassImpl);
|
||||
ngDoCheck(): void;
|
||||
}
|
||||
|
||||
export declare class NgClassBase {
|
||||
protected _delegate: NgClassImpl;
|
||||
constructor(_delegate: NgClassImpl);
|
||||
getValue(): {
|
||||
[key: string]: any;
|
||||
} | null;
|
||||
static ngDirectiveDef: any;
|
||||
}
|
||||
|
||||
export declare class NgComponentOutlet implements OnChanges, OnDestroy {
|
||||
ngComponentOutlet: Type<any>;
|
||||
ngComponentOutletContent: any[][];
|
||||
@ -283,14 +292,23 @@ export declare class NgPluralCase {
|
||||
constructor(value: string, template: TemplateRef<Object>, viewContainer: ViewContainerRef, ngPlural: NgPlural);
|
||||
}
|
||||
|
||||
export declare class NgStyle implements DoCheck {
|
||||
export declare class NgStyle extends NgStyleBase implements DoCheck {
|
||||
ngStyle: {
|
||||
[key: string]: string;
|
||||
};
|
||||
constructor(_differs: KeyValueDiffers, _ngEl: ElementRef, _renderer: Renderer2);
|
||||
[klass: string]: any;
|
||||
} | null;
|
||||
constructor(delegate: NgStyleImpl);
|
||||
ngDoCheck(): void;
|
||||
}
|
||||
|
||||
export declare class NgStyleBase {
|
||||
protected _delegate: NgStyleImpl;
|
||||
constructor(_delegate: NgStyleImpl);
|
||||
getValue(): {
|
||||
[key: string]: any;
|
||||
} | null;
|
||||
static ngDirectiveDef: any;
|
||||
}
|
||||
|
||||
export declare class NgSwitch {
|
||||
ngSwitch: any;
|
||||
}
|
||||
|
Reference in New Issue
Block a user