import { Injectable } from "@angular/core";
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from "@angular/router";
import { HttpClient } from '@angular/common/http';


export const path = './assets/definitions/flight-definitions/flight.json';

@Injectable()
export class AirportListTemplateResolver implements Resolve<any> {

    constructor(private httpClient: HttpClient) {}

    resolve(route: ActivatedRouteSnapshot) {
        return this.httpClient.get(path);
    }
    
}