Skip to content

Instantly share code, notes, and snippets.

View uloga's full-sized avatar
💭
Working on Shoplr

Alan M uloga

💭
Working on Shoplr
View GitHub Profile
@uloga
uloga / modulr-util.js
Last active October 30, 2020 05:00
Js
(function () {
'use strict';
angular
.module('modulr.utils', [])
.factory('$modUtil', UtilFactory);
/**
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); })();