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

Method ngOnInit

apps/ssr/src/app/app.component.ts:33–38  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31 constructor(@Inject(PLATFORM_ID) private platformId: string) {}
32
33 ngOnInit() {
34 if (isPlatformServer(this.platformId)) {
35 this.state.set('color', () => 'green');
36 this.state.set('colors', () => ['green', 'purple']);
37 }
38 }
39
40 // Just a dummy method to ensure that the `unpatch` directive is instantiated w/o exceptions
41 // on the server side.

Callers

nothing calls this directly

Calls 1

setMethod · 0.45

Tested by

no test coverage detected