ngBlur and ngFocus are now in Angular
This commit is contained in:
parent
e4843db27e
commit
457da3dff1
1 changed files with 0 additions and 20 deletions
|
@ -139,24 +139,4 @@ angular.module('podcast.directives', [])
|
|||
}
|
||||
};
|
||||
})
|
||||
.directive('ngFocus', ['$parse', function($parse) {
|
||||
return function(scope, element, attr) {
|
||||
var fn = $parse(attr['ngFocus']);
|
||||
element.bind('focus', function(event) {
|
||||
scope.$apply(function() {
|
||||
fn(scope, {$event:event});
|
||||
});
|
||||
});
|
||||
}
|
||||
}])
|
||||
.directive('ngBlur', ['$parse', function($parse) {
|
||||
return function(scope, element, attr) {
|
||||
var fn = $parse(attr['ngBlur']);
|
||||
element.bind('blur', function(event) {
|
||||
scope.$apply(function() {
|
||||
fn(scope, {$event:event});
|
||||
});
|
||||
});
|
||||
}
|
||||
}])
|
||||
;
|
Loading…
Add table
Add a link
Reference in a new issue