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

Method init

packages/core/testing/src/test_bed.ts:722–727  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

720 const noNgZone = this.inject(ComponentFixtureNoNgZone, false);
721 const ngZone = noNgZone ? null : this.inject(NgZone, null);
722 const init = () => {
723 const ref = this.createComponentRef(type, tagName, renderer, options?.bindings);
724 const fixture = this.runInInjectionContext(() => new ComponentFixture(ref));
725 this._activeFixtures.push(fixture);
726 return fixture;
727 };
728
729 return ngZone ? ngZone.run(init) : init();
730 }

Callers

nothing calls this directly

Calls 4

createComponentRefMethod · 0.95
runInInjectionContextMethod · 0.95
getMethod · 0.65
pushMethod · 0.45

Tested by

no test coverage detected