Commit 7c806b300d917b0719180cdb5a2b459828006503

Authored by Eric Fernandez
1 parent d19876cc13
Exists in master

directiva para controlar cuando pierde foco

Showing 1 changed file with 11 additions and 0 deletions   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 + });