aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/shared/resolvers/flag/flag.resolver.ts
blob: 7ebce8bdeacc90ea1e29a57c8fb7cdfe75bc1d34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import {ActivatedRouteSnapshot, Resolve} from "@angular/router";
import {Injectable} from "@angular/core";
import {Observable} from "rxjs";
import {ConfigurationService} from "../../services/configuration.service";

@Injectable()
export class FlagsResolve implements Resolve<Observable< { [key: string]: boolean }>> {

  constructor(private _configurationService: ConfigurationService) {}

  resolve(route: ActivatedRouteSnapshot) {
    return this._configurationService.getFlags();
  }
}