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

Method ngOnInit

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

Source from the content-addressed store, hash-verified

1156 counter = counter;
1157 injector = inject(EnvironmentInjector);
1158 ngOnInit() {
1159 afterNextRender(
1160 () => {
1161 this.counter.set(1);
1162 },
1163 {injector: this.injector},
1164 );
1165 }
1166 }
1167 TestBed.configureTestingModule({
1168 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