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

Method ngOnInit

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

Source from the content-addressed store, hash-verified

1268 counter = counter;
1269 injector = inject(EnvironmentInjector);
1270 ngOnInit() {
1271 afterNextRender(
1272 () => {
1273 this.counter.set(1);
1274 },
1275 {injector: this.injector},
1276 );
1277 }
1278 }
1279 TestBed.configureTestingModule({
1280 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