MCPcopy
hub / github.com/angular/angular / ngOnInit

Method ngOnInit

packages/core/test/acceptance/after_render_hook_spec.ts:1273–1280  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1271 counter = counter;
1272 injector = inject(EnvironmentInjector);
1273 ngOnInit() {
1274 afterNextRender(
1275 () => {
1276 this.counter.set(1);
1277 },
1278 {injector: this.injector},
1279 );
1280 }
1281 }
1282 TestBed.configureTestingModule({
1283 providers: [{provide: PLATFORM_ID, useValue: PLATFORM_BROWSER_ID}],

Callers

nothing calls this directly

Calls 6

afterNextRenderFunction · 0.90
timeoutFunction · 0.90
afterEveryRenderFunction · 0.90
markForCheckMethod · 0.80
setMethod · 0.65
updateMethod · 0.65

Tested by

no test coverage detected