Created
October 30, 2012 15:17
-
-
Save bfricka/3980869 to your computer and use it in GitHub Desktop.
AngularJS Focus/Blur
This file contains 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 'ngBlur', -> | |
(scope, elem, attrs) -> | |
elem.on "blur", -> | |
scope.$apply attrs.ngBlur | |
return | |
app.directive 'ngFocus', -> | |
(scope, elem, attrs) -> | |
elem.on "focus", -> | |
scope.$apply attrs.ngFocus | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment