From 70ed2677e096b498e81aef2682e2273c52184be6 Mon Sep 17 00:00:00 2001 From: Iblis Lin Date: Sat, 14 Feb 2015 14:31:00 +0800 Subject: [PATCH 1/2] Add adaptive interpolation symbol --- app/js/timer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/js/timer.js b/app/js/timer.js index 2df20fa..c8adaa2 100644 --- a/app/js/timer.js +++ b/app/js/timer.js @@ -12,7 +12,7 @@ var timerModule = angular.module('timer', []) autoStart: '&autoStart', maxTimeUnit: '=' }, - controller: ['$scope', '$element', '$attrs', '$timeout', function ($scope, $element, $attrs, $timeout) { + controller: ['$scope', '$element', '$attrs', '$timeout', '$interpolate', function ($scope, $element, $attrs, $timeout, $interpolate) { // Checking for trim function since IE8 doesn't have it // If not a function, create tirm with RegEx to mimic native trim @@ -28,7 +28,7 @@ var timerModule = angular.module('timer', []) $scope.autoStart = $attrs.autoStart || $attrs.autostart; if ($element.html().trim().length === 0) { - $element.append($compile('{{millis}}')($scope)); + $element.append($compile('' + $interpolate.startSymbol() + 'millis' + $interpolate.endSymbol() + '')($scope)); } else { $element.append($compile($element.contents())($scope)); } From 80734f42abf6fc708a8f2a3a0ff0c439d6dbbde6 Mon Sep 17 00:00:00 2001 From: Iblis Lin Date: Mon, 16 Feb 2015 22:55:49 +0800 Subject: [PATCH 2/2] Fix the build discussed in siddii/angular-timer#153 --- index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index e731ca4..6ee19a0 100644 --- a/index.html +++ b/index.html @@ -111,11 +111,11 @@

- Following is the countdown timer setting for the days, hours, minutes & seconds to January 1, 2015 (GMT-6) -

(01 Jan 2015 06:00:00 GMT = 1420070400000 milliseconds)

- <timer end-time="1420070400000">{{days}} days, {{hours}} hours, {{minutes}} minutes, {{seconds}} seconds.</timer> + Following is the countdown timer setting for the days, hours, minutes & seconds to January 1, 2016 (GMT-6) +

(01 Jan 2016 06:00:00 GMT = 1451628000000 milliseconds)

+ <timer end-time="1451628000000">{{days}} days, {{hours}} hours, {{minutes}} minutes, {{seconds}} seconds.</timer>

- {{days}} days, {{hours}} hours, {{minutes}} minutes, {{seconds}} seconds. + {{days}} days, {{hours}} hours, {{minutes}} minutes, {{seconds}} seconds.