Skip to content

Instantly share code, notes, and snippets.

@sj26

sj26/gist:5201226

Last active Dec 15, 2015
Embed
What would you like to do?
# What about a decorator?
injecting = (inject..., method) ->
method = method.into if method.into?
method.$inject = inject
method
my.angular.directives.directive "mydirective",
injecting "$http", "$lolwhut", into: ($http, $lolwhut) ->
scope:
here: "i"
bind: "=some"
things: "&away"
link: (scope, el, attrs) ->
"WOW I'M DIRECTING"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment