refactoring
This commit is contained in:
parent
bce75e76fe
commit
6cc10768d3
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -41,3 +41,4 @@ testem.log
|
||||||
.DS_Store
|
.DS_Store
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
src/environments/environment.ts
|
src/environments/environment.ts
|
||||||
|
src/environments/environment.ts
|
||||||
|
|
|
@ -9,12 +9,9 @@ import { environment } from 'src/environments/environment';
|
||||||
})
|
})
|
||||||
export class WeatherApiService {
|
export class WeatherApiService {
|
||||||
url: string = environment.weatherApiBaseUrl;
|
url: string = environment.weatherApiBaseUrl;
|
||||||
temp:any
|
|
||||||
|
|
||||||
|
|
||||||
constructor(private http: HttpClient) { }
|
constructor(private http: HttpClient) { }
|
||||||
|
|
||||||
|
|
||||||
getData(): Observable<WeatherData> {
|
getData(): Observable<WeatherData> {
|
||||||
return this.http.get<WeatherData>(this.url)
|
return this.http.get<WeatherData>(this.url)
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
// The list of file replacements can be found in `angular.json`.
|
// The list of file replacements can be found in `angular.json`.
|
||||||
|
|
||||||
export const environment = {
|
export const environment = {
|
||||||
production: false
|
production: false,
|
||||||
|
weatherApiBaseUrl: "https://api.weather.com/v3/wx/forecast/daily/5day?geocode=49.9667,7.9046&format=json&units=m&language=de-DE&apiKey=bd2007c3853d41bba007c3853d21bbb1"
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue
Block a user