Skip to content

Instantly share code, notes, and snippets.

@ahmednuaman
Last active December 16, 2015 08:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahmednuaman/5403270 to your computer and use it in GitHub Desktop.
Save ahmednuaman/5403270 to your computer and use it in GitHub Desktop.
AngularJS directive on RequireJS in CoffeeScript
define [
'config'
'angular'
], (cfg, A) ->
ADirective = () ->
link: ($scope, $element, $attrs) ->
ADirective.$inject = []
app = A.module cfg.ngApp
app.directive 'aDirective', ADirective
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment