Skip to content

Instantly share code, notes, and snippets.

@hmaurer
Created September 12, 2012 12:10
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 hmaurer/3706207 to your computer and use it in GitHub Desktop.
Save hmaurer/3706207 to your computer and use it in GitHub Desktop.
angular.module('app.controllers', [])
Object.keys require('./src/controllers'), (name, controller) ->
angular.module('app.controllers').controller(name, controller)
angular.module('app.directives', [])
Object.keys require('./src/directives'), (name, directive) ->
angular.module('app.directives').directive(name, directive)
# REFACTOR
var app.controllers = angular.module('app.controllers', [])
Object.keys require('./src/controllers'), (name, controller) -> app.controllers.controller(name, controller)
var app.directives = angular.module('app.directives', [])
Object.keys require('./src/directives'), (name, directive) -> app.directives.directive(name, directive)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment