Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | 2x 10x 10x 10x 10x 1x | import { inject, Injectable } from '@angular/core';
import { WEB_CLIENT_APP_ENV } from '@app/client-util';
import { Actions, createEffect, ofType } from '@ngrx/effects';
import { map } from 'rxjs/operators';
import { featureAccessAction } from './feature-access.actions';
@Injectable({
providedIn: 'root',
})
export class AppFeatureAccessEffects {
private readonly actions$ = inject(Actions);
private readonly env = inject(WEB_CLIENT_APP_ENV);
public readonly action$ = createEffect(() =>
this.actions$.pipe(
ofType(featureAccessAction.initialize.type),
map(() => featureAccessAction.setEnvironment({ payload: { production: this.env.production } })),
),
);
}
|