blob: 70449379f69cca494ab4120dc0b22ecdf19ee134 [file] [log] [blame]
Sonsino, Ofir (os0695)ff76b5e2018-07-10 15:57:37 +03001import {ActivatedRouteSnapshot, Resolve} from "@angular/router";
2import {Injectable} from "@angular/core";
3import {ConfigurationService} from "./configuration.service";
4import {Observable} from "rxjs/Observable";
5
6@Injectable()
7export class FlagsResolve implements Resolve<Observable< { [key: string]: boolean }>> {
8
9 constructor(private _configurationService: ConfigurationService) {}
10
11 resolve(route: ActivatedRouteSnapshot) {
12 return this._configurationService.getFlags();
13 }
14}