Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Add documentation to $interval.cancel(); #6367

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/ngMock/angular-mocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down