$scope.countdown = function () {
countdownStop = $timeout(function () {
if ($scope.counter == 0) {
$scope.stop();
$scope.completeRound();
}
else {
$scope.counter--;
$scope.countdown();
}
}, 1000);
};
$scope.stop = function () {
$timeout.cancel(countdownStop);
}
here i can able to stop and start but now i would like to add pause button to my timer when user clicks on pause button how i can i do that i am new to angularjs i was added one button in my game to pause my game