Im making function in my app that when I entered a specific number, It will display the in hh:mm:ss format and start counting down. The input number will be treated as minutes for example when I input 2, the display would be 00:02:00 then it will start counting down.
<body ng-app="mehmetcankerApp">
<!--counterCtrl App Controller -->
<div ng-controller="counterCtrl">
<!--Angular Binding -->
<input type="number" ng-model="counter"/>
<p ng-model="format" ng-bind="counter" id="numOfDozens"></p>
<button ng-click="stop()">Stop</button>
<button ng-click="countdown()">Start</button>
</div>
The whole code is in this plnker link: http://plnkr.co/edit/Mzv6W9smmRkaDPU4cgVa?p=preview