fix(ivy): ComponentFactory.create should clear host element content (#33487)
Prior to this change, ComponentFactory.create function invocation in Ivy retained the content of the host element (in case host element reference or CSS seelctor is provided as an argument). This behavior is different in View Engine, where the content of the host element was cleared, except for the case when ShadowDom encapsulation is used (to make sure native slot projection works). This commit aligns Ivy and View Engine and makes sure the host element is cleared before component content insertion. PR Close #33487
This commit is contained in:

committed by
Kara Erickson

parent
9485e16e3b
commit
cf10b336e7
@ -167,7 +167,12 @@ export interface R3FactoryDefMetadataFacade {
|
||||
target: R3FactoryTarget;
|
||||
}
|
||||
|
||||
export type ViewEncapsulation = number;
|
||||
export enum ViewEncapsulation {
|
||||
Emulated = 0,
|
||||
Native = 1,
|
||||
None = 2,
|
||||
ShadowDom = 3
|
||||
}
|
||||
|
||||
export type ChangeDetectionStrategy = number;
|
||||
|
||||
|
Reference in New Issue
Block a user