Skip to content

Instantly share code, notes, and snippets.

@uloga
Created January 16, 2017 10:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uloga/042d54d16646b5f53e92114782c8060d to your computer and use it in GitHub Desktop.
Save uloga/042d54d16646b5f53e92114782c8060d to your computer and use it in GitHub Desktop.
javascript: (function () { var watchers, elementsWithScope, scope, i, len; watchers = 0; elementsWithScope = document.querySelectorAll('.ng-scope'); for (i = 0, len = elementsWithScope.length; i < len; i++) { scope = angular.element(elementsWithScope[i]).scope(); if (scope.$$watchers != null) { watchers += scope.$$watchers.length; } } console.log(watchers); })();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment