MCPcopy
hub / github.com/angular/angular / create

Method create

packages/core/test/acceptance/view_ref_spec.ts:48–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46 ) {}
47
48 create() {
49 this.componentRef = createComponent(DynamicComponent, {environmentInjector: this.injector});
50 (this.componentRef.hostView as InternalViewRef<unknown>).attachToAppRef(this.appRef);
51 document.body.appendChild(this.componentRef.instance.elRef.nativeElement);
52 }
53
54 destroy() {
55 (this.componentRef.hostView as InternalViewRef<unknown>).detachFromAppRef();

Callers

nothing calls this directly

Calls 6

createComponentFunction · 0.90
attachToAppRefMethod · 0.80
appendChildMethod · 0.65
createEmbeddedViewMethod · 0.65
createComponentMethod · 0.65
insertMethod · 0.45

Tested by

no test coverage detected