Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
App init service for loading feature flags
providedIn: 'root'
export class AppInitService {
constructor(private httpClient: HttpClient, private featureToggleService: FeatureToggleService) {}
public init() {
return this.httpClient
.pipe(tap((features) => (this.featureToggleService.features = features as any)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment