A countdown time directive for angular.
-
include
angular-countdowntimeas angular dependence.var app = angular.module('myApp', ['angular-countdowntime']);
-
write your element like this.
<div countdown-time time-end="2016-12-25T12:00:00" time-end-callback="doSomething()"> {{dMinutes}}{{uMinutes}}:{{dSeconds}}{{uSeconds}} </div>
time-format,fullwith leading zero, ornormalwithout leading zero.time-interval, default to1000mstime-endtime-end-callback, the callback when time countdown end.
MIT