MCPcopy Create free account
hub / github.com/angular/angular / create

Method create

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

Source from the content-addressed store, hash-verified

302 ) {}
303
304 create() {
305 // Component to be bootstrapped into an element with the `app-root` id.
306 this.componentRef = createComponent(DynamicComponent, {
307 environmentInjector: this.injector,
308 hostElement: this.elementRef.nativeElement.querySelector('#app-root')!,
309 });
310 this.appRef.attachView(this.componentRef.hostView);
311 }
312
313 destroy() {
314 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