|
@@ -25,6 +25,7 @@ export class WeatherCardComponent implements OnInit {
|
|
|
cityName: string;
|
|
cityName: string;
|
|
|
cityAdded = false;
|
|
cityAdded = false;
|
|
|
icon: string;
|
|
icon: string;
|
|
|
|
|
+ icon_exists: boolean;
|
|
|
pipe = new DatePipe('es-ES')
|
|
pipe = new DatePipe('es-ES')
|
|
|
newDate = Date.now();
|
|
newDate = Date.now();
|
|
|
currentDate = this.pipe.transform(this.newDate, 'fullDate')
|
|
currentDate = this.pipe.transform(this.newDate, 'fullDate')
|
|
@@ -40,6 +41,7 @@ export class WeatherCardComponent implements OnInit {
|
|
|
this.cityName = payload.name
|
|
this.cityName = payload.name
|
|
|
this.state = payload.weather[0].description;
|
|
this.state = payload.weather[0].description;
|
|
|
this.temp = Math.ceil(payload.main.temp);
|
|
this.temp = Math.ceil(payload.main.temp);
|
|
|
|
|
+ this.icon_exists = true;
|
|
|
this.icon = payload.weather[0].icon;
|
|
this.icon = payload.weather[0].icon;
|
|
|
}, (err) => {
|
|
}, (err) => {
|
|
|
this.errorMessage = err.error.message;
|
|
this.errorMessage = err.error.message;
|