We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e63e65 commit 5af28a9Copy full SHA for 5af28a9
ng-count-watchers.js
@@ -8,6 +8,7 @@
8
watchers = [];
9
10
var mostWatchers = 0;
11
+ var maxWatchersToPrint = 20;
12
13
function countScopeWatchers(scope, element) {
14
test[scope.$id] = true;
@@ -35,6 +36,9 @@
35
36
}
37
38
- console.log('this page has ' + watchers.length + ' angular watchers and the watchers are:', watchers );
39
+ console.log('this page has ' + watchers.length + ' angular watchers');
40
+ if (watchers.length < maxWatchersToPrint) {
41
+ console.log('the watchers are:', watchers);
42
+ }
43
return count;
44
}(window.angular));
0 commit comments