This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = class AngularController | |
# register the subclass with angular, module and name are optional | |
@register: (name, module) -> | |
module ?= @module || angular.module 'controllers' | |
name ?= @name || @toString().match(/function\s*(.*?)\(/)?[1] | |
module.controller name, @ | |
# inject the list of dependencies, as a list of Strings | |
@inject: (args...) -> |