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

Method createComponent

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

Source from the content-addressed store, hash-verified

403 elementRef = inject(ElementRef);
404
405 createComponent() {
406 const host = document.createElement('div');
407 this.outlet.nativeElement.appendChild(host);
408
409 const ref = createComponent(DynamicComponent, {
410 environmentInjector: this.envInjector,
411 hostElement: host,
412 });
413
414 this.appRef.attachView(ref.hostView);
415
416 return ref;
417 }
418 }
419
420 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