AngularJS: use $timeout, not setTimeout | AngularJS | Scoop.it

There are some cases where one needs to perform some sort of timeout operation and we frequently achieve this using JavaScript's setTimeout() function.

However, if we use setTimeout() in an AngularJS application we also need to use$scope.$apply() to ensure that any changes to the scope will be reflected elsewhere (i.e. data-bound in a view).