Skip to content

Commit c2c12fe

Browse files
committed
just printing number of digest cycles
1 parent 9b425fc commit c2c12fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ng-count-digest-cycles.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
var count = 0;
2626
$rootScope.$watch(function () {
2727
count += 1;
28+
console.log('digest cycle ran', count, 'times');
2829
});
2930

3031
var $q = el.injector().get('$q');
@@ -39,7 +40,6 @@
3940
scope.$$postDigest(function () {
4041
scope[methodName] = fn;
4142
console.log('restored', methodName);
42-
console.log('digest cycle ran', count, 'time(s) during', name);
4343
});
4444
});
4545
};

0 commit comments

Comments
 (0)