I am using the tutorial from http://codepen.io/jhasselkus/pen/Efaxw to create a stopwatch.
The stopwatch displays the action in milliseconds.
In my case, I only need seconds or minutes.
I thought that update-intervalused should be at the beginning.
.controller('MainCtrl', function($scope, $interval) {
$scope.version = angular.version.full;
$scope.sharedTime = new Date();
$interval(function() {
$scope.sharedTime = new Date();
}, 500);
})
The update interval is 500 ms.
I changed it to 10,000 or to 50,000, but nothing has changed on the website. What needs to be changed to display the timer in minutes or seconds? And why does changing the value of "500" affect nothing?
source
share