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

export const BASE_PATH = './assets/definitions/vuelo-definitions/vuelo.json';

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

  constructor(
    private http: HttpClient)  {}
  
  resolve(route: ActivatedRouteSnapshot) {
    return this.http.get(BASE_PATH);
  }
}