import { Injectable } from '@angular/core' ; import { ActivatedRouteSnapshot , Resolve } from '@angular/router' ; import { StoreService } from '../../store/store.service' ; import { Settings } from 'app/settings' ; @ Injectable ( ) export class SettingsResolver implements Resolve < Promise < Settings > > { constructor ( private storeService ) { this . storeService = storeService ; } async resolve ( route ) { return await this . storeService . getSettings ( ) ; } }