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:
committed by
Caitlin Potter
parent
39bae62f53
commit
6082e2ad16
Vendored
+11
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user