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

Method create

packages/core/test/acceptance/component_spec.ts:315–322  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

313 ) {}
314
315 create() {
316 // Component to be bootstrapped into an element with the `app-root` id.
317 this.componentRef = createComponent(DynamicComponent, {
318 environmentInjector: this.injector,
319 hostElement: this.elementRef.nativeElement.querySelector('#app-root')!,
320 });
321 this.appRef.attachView(this.componentRef.hostView);
322 }
323
324 destroy() {
325 this.componentRef.destroy();

Callers

nothing calls this directly

Calls 5

createComponentFunction · 0.90
attachViewMethod · 0.80
createComponentMethod · 0.65
onDestroyMethod · 0.65
insertMethod · 0.45

Tested by

no test coverage detected