MCPcopy
hub / github.com/angular/angular / createComponent

Method createComponent

packages/core/test/change_detection_scheduler_spec.ts:403–415  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

401 elementRef = inject(ElementRef);
402
403 createComponent() {
404 const host = document.createElement('div');
405 this.outlet.nativeElement.appendChild(host);
406
407 const ref = createComponent(DynamicComponent, {
408 environmentInjector: this.envInjector,
409 hostElement: host,
410 });
411
412 this.appRef.attachView(ref.hostView);
413
414 return ref;
415 }
416 }
417
418 const applicationRef = await bootstrapApplication(App, {

Callers

nothing calls this directly

Calls 4

createComponentFunction · 0.90
attachViewMethod · 0.80
createElementMethod · 0.65
appendChildMethod · 0.65

Tested by

no test coverage detected