Files
psp_panel/src/app/demo/service/countryservice.ts
T
Cetin Cakiroglu 89b1bf58fa add template
2021-12-09 17:24:42 +03:00

16 lines
366 B
TypeScript
Executable File

import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
@Injectable()
export class CountryService {
constructor(private http: HttpClient) { }
getCountries() {
return this.http.get<any>('assets/demo/data/countries.json')
.toPromise()
.then(res => res.data as any[])
.then(data => data);
}
}