mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
Weather
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<div id="current-weather" *ng-if="current">
|
||||
<div id="current-weather" *ng-if="current && current.currently">
|
||||
<h5><weather-icon icon="current.icon" id="current-icon"></weather-icon> {{current.currently.summary}}</h5>
|
||||
<h5>
|
||||
<span id="temp-hi"><i class="icon ion-arrow-up-c"></i> <span ng-bind="highTemp"></span>°</span>
|
||||
|
||||
@@ -241,7 +241,7 @@ export class CurrentWeather {
|
||||
|
||||
console.log('ALL CHANGES DONE', current);
|
||||
|
||||
if(current) {
|
||||
if(current && current.currently) {
|
||||
if(units == 'f') {
|
||||
this.currentTemp = Math.floor(current.currently.temperature);
|
||||
} else {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
<ion-content>
|
||||
<div id="main-content">
|
||||
<current-weather></current-weather>
|
||||
<current-weather [current]="current"></current-weather>
|
||||
<forecast></forecast>
|
||||
</div>
|
||||
</ion-content>
|
||||
|
||||
Reference in New Issue
Block a user