docs(ngMock): document method ngMock.$interval#cancel()

I have been looking around and was not able to find any informations on how to clear the $interval
but reading the source code, sharing is caring!

Closes #6367
This commit is contained in:
Sadaoui Abderrahim
2014-02-20 06:03:32 -08:00
committed by Caitlin Potter
parent 39bae62f53
commit 6082e2ad16
+11 -1
View File
@@ -491,7 +491,17 @@ angular.mock.$IntervalProvider = function() {
nextRepeatId++;
return promise;
};
/**
* @ngdoc method
* @name $interval#cancel
* @description
*
* Clears the interval.
*
* @param {promise} The promise of the interval to cancel.
*
* @return {boolean}
*/
$interval.cancel = function(promise) {
if(!promise) return false;
var fnIndex;