Commit 37713937392285640c66f03680d34bd1edcebf24
Exists in
master
Merge branch 'master' into 'master'
directiva para controlar cuando pierde foco See merge request modulos-npm/foca-directivas!6
Showing
1 changed file
Show diff stats
src/js/tecladoVirtual-directive.js
... | ... | @@ -0,0 +1,11 @@ |
1 | +angular.module('focaDirectivas') | |
2 | + .directive('tecladoVirtual', function() { | |
3 | + return function( scope, elem, attrs ) { | |
4 | + elem.bind('blur', function() { | |
5 | + scope.$emit('focus', false); | |
6 | + }); | |
7 | + elem.bind('focus', function() { | |
8 | + scope.$emit('focus', true); | |
9 | + }); | |
10 | + }; | |
11 | + }); |