We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 167c061 + ffe15d8 commit 252538fCopy full SHA for 252538f
app/js/timer.js
@@ -69,6 +69,12 @@ var timerModule = angular.module('timer', [])
69
}
70
71
72
+ $scope.$watch('startTimeAttr', function(newValue, oldValue) {
73
+ if (newValue !== oldValue && $scope.isRunning) {
74
+ $scope.start();
75
+ }
76
+ });
77
+
78
$scope.start = $element[0].start = function () {
79
$scope.startTime = $scope.startTimeAttr ? new Date($scope.startTimeAttr) : new Date();
80
$scope.endTime = $scope.endTimeAttr ? new Date($scope.endTimeAttr) : null;
0 commit comments