angular.module('$app.directives') | |
.directive 'showAfterEvent', ['$timeout', ($timeout)-> | |
return { | |
link: (scope, element, attrs) -> | |
eventName = attrs.showAfterEvent | |
element.css 'opacity', 0 | |
element.bind eventName, (e) -> | |
$timeout -> | |
element.css 'opacity', '' | |
, 150 | |
scope.$on '$destroy', -> | |
element.unbind eventName | |
} | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment