fix(ivy): add missing @nocollapse annotation to __NG_ELEMENT_ID__ fields (#28050)
__NG_ELEMENT_ID__ static fields are a part of how the Ivy node injector works. In order to survive closure minification correctly, they need to be annotated with @nocollapse. PR Close #28050
This commit is contained in:
parent
61bc61fc59
commit
091a8a6fd5
|
@ -108,6 +108,7 @@ export abstract class ChangeDetectorRef {
|
|||
abstract reattach(): void;
|
||||
|
||||
/** @internal */
|
||||
/** @nocollapse */
|
||||
static __NG_ELEMENT_ID__: () => ChangeDetectorRef = () => SWITCH_CHANGE_DETECTOR_REF_FACTORY();
|
||||
}
|
||||
|
||||
|
|
|
@ -110,6 +110,7 @@ export abstract class Injector {
|
|||
});
|
||||
|
||||
/** @internal */
|
||||
/** @nocollapse */
|
||||
static __NG_ELEMENT_ID__: () => Injector = () => SWITCH_INJECTOR_FACTORY();
|
||||
}
|
||||
|
||||
|
|
|
@ -51,6 +51,7 @@ export class ElementRef<T = any> {
|
|||
constructor(nativeElement: T) { this.nativeElement = nativeElement; }
|
||||
|
||||
/** @internal */
|
||||
/** @nocollapse */
|
||||
static __NG_ELEMENT_ID__: () => ElementRef = () => SWITCH_ELEMENT_REF_FACTORY(ElementRef);
|
||||
}
|
||||
|
||||
|
|
|
@ -54,6 +54,7 @@ export abstract class TemplateRef<C> {
|
|||
abstract createEmbeddedView(context: C): EmbeddedViewRef<C>;
|
||||
|
||||
/** @internal */
|
||||
/** @nocollapse */
|
||||
static __NG_ELEMENT_ID__:
|
||||
() => TemplateRef<any>| null = () => SWITCH_TEMPLATE_REF_FACTORY(TemplateRef, ElementRef)
|
||||
}
|
||||
|
|
|
@ -145,6 +145,7 @@ export abstract class ViewContainerRef {
|
|||
abstract detach(index?: number): ViewRef|null;
|
||||
|
||||
/** @internal */
|
||||
/** @nocollapse */
|
||||
static __NG_ELEMENT_ID__:
|
||||
() => ViewContainerRef = () => SWITCH_VIEW_CONTAINER_REF_FACTORY(ViewContainerRef, ElementRef)
|
||||
}
|
||||
|
|
|
@ -374,6 +374,7 @@ export abstract class Renderer2 {
|
|||
callback: (event: any) => boolean | void): () => void;
|
||||
|
||||
/** @internal */
|
||||
/** @nocollapse */
|
||||
static __NG_ELEMENT_ID__: () => Renderer2 = () => SWITCH_RENDERER2_FACTORY();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue