diff options
| author | Sadaoui Abderrahim | 2014-02-20 06:03:32 -0800 |
|---|---|---|
| committer | Caitlin Potter | 2014-02-20 10:43:05 -0500 |
| commit | 6082e2ad16d941a070fda16212d7a24e3dbb80ad (patch) | |
| tree | 950bcbb06b94e5d41894001fabe155cb9d587325 | |
| parent | 39bae62f53f4fab72f5f40d3e9f8e14ad5e998c9 (diff) | |
| download | angular.js-6082e2ad16d941a070fda16212d7a24e3dbb80ad.tar.bz2 | |
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
| -rw-r--r-- | src/ngMock/angular-mocks.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/ngMock/angular-mocks.js b/src/ngMock/angular-mocks.js index a9593e58..70fd2159 100644 --- a/src/ngMock/angular-mocks.js +++ b/src/ngMock/angular-mocks.js @@ -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; |
