You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
530 B
CoffeeScript
19 lines
530 B
CoffeeScript
# Directives
|
|
|
|
|
|
angular
|
|
.module('myApp.directives', [])
|
|
.directive('appVersion', ['version', (version)->
|
|
(scope, elm, attrs)->
|
|
elm.text(version)
|
|
])
|
|
.directive('hoverShow', ()->
|
|
link: (scope, elm, attrs)->
|
|
elm.bind('mouseover', {attrs: attrs}, (ev)->
|
|
elm.closest('.projects').find('.' + ev.data.attrs.hoverShow).show()
|
|
)
|
|
elm.bind('mouseout', {attrs: attrs}, (ev)->
|
|
elm.closest('.projects').find('.' + ev.data.attrs.hoverShow).hide()
|
|
)
|
|
)
|