From 1932d9eb3c15572c94d80cd3de794610bc69eaf9 Mon Sep 17 00:00:00 2001 From: Max Lynch Date: Wed, 23 Oct 2013 20:40:59 -0500 Subject: [PATCH] Fixed weather date --- starters/weather/app.js | 2 +- starters/weather/directives.js | 5 ++--- starters/weather/index.html | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/starters/weather/app.js b/starters/weather/app.js index 98a015da79..a88b85c823 100644 --- a/starters/weather/app.js +++ b/starters/weather/app.js @@ -62,7 +62,7 @@ angular.module('ionic.weather', ['ionic.weather.services', 'ionic.weather.direct if($scope.bgImages) { $scope.activeBgImage = $scope.bgImages[$scope.activeBgImageIndex++ % $scope.bgImages.length]; } - $timeout(cycle, 5000); + $timeout(cycle, 10000); }); }; diff --git a/starters/weather/directives.js b/starters/weather/directives.js index 99886b8103..19ad53a6ee 100644 --- a/starters/weather/directives.js +++ b/starters/weather/directives.js @@ -7,12 +7,11 @@ angular.module('ionic.weather.directives', []) template: '{{currentTime}}', scope: { localtz: '=', - localTime: '=' }, link: function($scope, $element, $attr) { $timeout(function checkTime() { - if($scope.localTime && $scope.localtz) { - $scope.currentTime = $filter('date')(parseInt($scope.localTime), 'h:mm') + $scope.localtz; + if($scope.localtz) { + $scope.currentTime = $filter('date')(+(new Date), 'h:mm') + $scope.localtz; } $timeout(checkTime, 500); }); diff --git a/starters/weather/index.html b/starters/weather/index.html index 309e9783d9..08694ae512 100644 --- a/starters/weather/index.html +++ b/starters/weather/index.html @@ -26,7 +26,7 @@