Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.