Sha256: 0ab05f039432fd81f9b0646bea29f10f1b379ad393388302fcc30ae53222909b
Contents?: true
Size: 584 Bytes
Versions: 113
Compression:
Stored size: 584 Bytes
Contents
angular.module('NgWatchShow', []) .directive 'ngWatchShow', ($timeout)-> link: (scope, element, attributes) -> scope.$watch attributes.ngWatchShow, (newVal) -> if (newVal) element.removeClass('ng-hide') else if element.is(":focus") inputs = document.getElementsByTagName('input') for input, index in inputs inputIndex = index if input == element[0] input = angular.element inputs[inputIndex + 1] $timeout -> input.focus() element.addClass('ng-hide')
Version data entries
113 entries across 113 versions & 1 rubygems