aboutsummaryrefslogtreecommitdiffstats
path: root/docs/src
diff options
context:
space:
mode:
authorIgor Minar2012-06-12 00:11:04 -0700
committerIgor Minar2012-06-12 00:11:04 -0700
commitd9ff5fd432314d2b5f5e6766240c918f10d3b83d (patch)
tree0a2e2a035525293fe7db8b96d6446fe372ecf006 /docs/src
parentf16150d5f1b20b3d633b4402095ea89baa4be042 (diff)
downloadangular.js-d9ff5fd432314d2b5f5e6766240c918f10d3b83d.tar.bz2
fix(docs): migrate from $defer to $timeout
Diffstat (limited to 'docs/src')
-rw-r--r--docs/src/templates/js/docs.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/docs/src/templates/js/docs.js b/docs/src/templates/js/docs.js
index 2eaa7c29..de40db64 100644
--- a/docs/src/templates/js/docs.js
+++ b/docs/src/templates/js/docs.js
@@ -5,16 +5,18 @@ var docsApp = {
};
-docsApp.directive.focused = function($defer) {
+docsApp.directive.focused = function($timeout) {
return function(scope, element, attrs) {
element[0].focus();
element.bind('focus', function() {
scope.$apply(attrs.focused + '=true');
});
element.bind('blur', function() {
- // have to use defer, so that we close the drop-down after the user clicks,
+ // have to use $timeout, so that we close the drop-down after the user clicks,
// otherwise when the user clicks we process the closing before we process the click.
- $defer(attrs.focused + '=false');
+ $timeout(function() {
+ scope.$eval(attrs.focused + '=false');
+ });
});
scope.$eval(attrs.focused + '=true')
}