add template
This commit is contained in:
Executable
+15
@@ -0,0 +1,15 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user