This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@App.directive "onDelayedKeyup", ['$timeout', ($timeout) -> | |
(scope, element, attrs) -> | |
timer = false | |
element.bind "keyup", -> | |
$timeout.cancel(timer) if timer | |
timer = $timeout -> | |
scope.$apply attrs.onKeyup | |
, 500 | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function()%20{var%20root%20=%20$(document.getElementsByTagName(%27body%27));var%20watchers%20=%20[];var%20f%20=%20function(element)%20{if%20(element.data().hasOwnProperty(%27$scope%27))%20{angular.forEach(element.data().$scope.$$watchers,%20function(watcher)%20{watchers.push(watcher);});}angular.forEach(element.children(),%20function(childElement)%20{f($(childElement));});};f(root);console.log(watchers.length);}()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Adapted from: https://gist.github.com/gnomeontherun/5678505 | |
(function(angular, document){ | |
'use strict'; | |
angular.module('YOURMODULENAMEHERE').factory('intercept', ['$q', function($q) { | |
console.log("intercept factory is running"); | |
var i = {}; | |