Skip to content

Instantly share code, notes, and snippets.

View nilesh93's full-sized avatar
🎯
Focusing

Nilesh Jayanandana nilesh93

🎯
Focusing
  • @platformer-com
  • Colombo, Sri Lanka
View GitHub Profile
function getWatchers(root) {
root = angular.element(root || document.documentElement);
var watcherCount = 0;
function getElemWatchers(element) {
var isolateWatchers = getWatchersFromScope(element.data().$isolateScope);
var scopeWatchers = getWatchersFromScope(element.data().$scope);
var watchers = scopeWatchers.concat(isolateWatchers);
angular.forEach(element.children(), function (childElement) {
watchers = watchers.concat(getElemWatchers(angular.element(childElement)));
@nilesh93
nilesh93 / angular-watchers-count
Created April 28, 2017 05:21
Get Angular Watchers count
(function () {
if (!angular) {
console.log('Not a angular application or window.angular not found');
return;
}
var root = angular.element(document.getElementsByTagName('body'));
var watchers = [];
#For PHP country Information
https://github.com/rinvex/country
#PHP enable CORS
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, DELETE');