Created
July 9, 2020 11:33
-
-
Save thisiszoaib/e9367c5f2fa8ec199c9abb9dfdcc1483 to your computer and use it in GitHub Desktop.
Weather 3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Injectable({ providedIn: "root" }) | |
| export class WeatherService { | |
| constructor(private http: HttpClient) {} | |
| getWeatherForCity(city: string): Observable<any> { | |
| const path = `https://api.openweathermap.org/data/2.5/weather?q=${city}&units=metric&APPID=695ed9f29c4599b7544d0db5c211d499`; | |
| return this.http.get(path); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment