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)); } 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>