You probably didn't declare your module correctly, or you put the function before the module is declared (safe rule is to put angular module after the body, once all the page is loaded). Since you're using angularjs, then you should use $interval (angularjs equivalence to setInterval which is a windows service).
Here is a working solution:
angular.module('count', [])_x000D_
.controller('countController', function($scope, $interval) {_x000D_
$scope.countDown = 10;_x000D_
$interval(function() {_x000D_
console.log($scope.countDown--);_x000D_
}, 1000, $scope.countDown);_x000D_
});
_x000D_
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.7.1/angular.min.js"></script>_x000D_
_x000D_
_x000D_
<body>_x000D_
<div ng-app="count" ng-controller="countController"> {{countDown}} </div>_x000D_
</body>
_x000D_
Note: it stops at 0 in the html view, but at 1 in the console.log, can you figure out why? ;)