diff options
Diffstat (limited to 'vid-webpack-master/src/app/shared/resolvers/flag/flag.resolver.ts')
-rw-r--r-- | vid-webpack-master/src/app/shared/resolvers/flag/flag.resolver.ts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/vid-webpack-master/src/app/shared/resolvers/flag/flag.resolver.ts b/vid-webpack-master/src/app/shared/resolvers/flag/flag.resolver.ts new file mode 100644 index 000000000..7ebce8bde --- /dev/null +++ b/vid-webpack-master/src/app/shared/resolvers/flag/flag.resolver.ts @@ -0,0 +1,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(); + } +} |