May 2018
Intermediate to advanced
512 pages
11h 3m
English
Now, we can implement the GET call in the Weather service:
src/app/weather/weather.service.tsimport { environment } from '../../environments/environment'...export class WeatherService { constructor(private httpClient: HttpClient) { } getCurrentWeather(city: string, country: string) { return this.httpClient.get<ICurrentWeatherData>( `${environment.baseUrl}api.openweathermap.org/data/2.5/weather?` + `q=${city},${country}&appid=${environment.appId}` ) }}
Read now
Unlock full access