angular.js - angular {{time | date:'mm:ss'}} to implement countdown.
習慣沉默
習慣沉默 2017-05-15 17:03:11
0
1
576
<span>{{time | date:'mm:ss'}}</span>

$scope.time= 900000; //15分钟

$one_minute = $interval(function(){
    $scope.time--;
},1000);

In this case, it will only move once at 14:59 and then stop moving date:'mm:ss' There is a problem here

習慣沉默
習慣沉默

reply all(1)
巴扎黑

Just click $scope.time--;换成$scope.time -= 1000; and it’s OK, the time format is fine.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template