KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm trying to split my controllers into multiple files, but when i try to register them at my module im getting an error: groupcontroller.coffee app = angular.module('WebChat', []); app.controller 'GroupController', ($scope) -> usercontroller.coffee app = angular.module('WebChat', []); app.controller 'UserController', ($scope) -> Error Error: Argument 'GroupController' is not a function, got undefined From the documentation I dont really get what the module method does anyway. Does it store my controller with the key 'Webchat'? Edit: It also seems that passing [] creates a new module and overwrites the previous one app = angular.module('WebChat', []); To prevent this, you have to leave out the [] like app = angular.module('WebChat');
Tags (comma-separated)
Save Edits
Cancel