Sonsino, Ofir (os0695) | ff76b5e | 2018-07-10 15:57:37 +0300 | [diff] [blame] | 1 | import {ActivatedRouteSnapshot, Resolve} from "@angular/router"; |
| 2 | import {Injectable} from "@angular/core"; |
| 3 | import {ConfigurationService} from "./configuration.service"; |
| 4 | import {Observable} from "rxjs/Observable"; |
| 5 | |
| 6 | @Injectable() |
| 7 | export 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 | } |