We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d34157e commit ffe15d8Copy full SHA for ffe15d8
1 file changed
app/js/timer.js
@@ -64,6 +64,12 @@ angular.module('timer', [])
64
}
65
66
67
+ $scope.$watch('startTimeAttr', function(newValue, oldValue) {
68
+ if (newValue !== oldValue && $scope.isRunning) {
69
+ $scope.start();
70
+ }
71
+ });
72
+
73
$scope.start = $element[0].start = function () {
74
$scope.startTime = $scope.startTimeAttr ? new Date($scope.startTimeAttr) : new Date();
75
$scope.endTime = $scope.endTimeAttr ? new Date($scope.endTimeAttr) : null;
0 commit comments