Answer the question
In order to leave comments, you need to log in
Difference between module definitions in AngularJS?
Hello. I read the styleguide on AJS and it says there that you need to define the module and its dependencies as follows:
// ./app.modules.js
angular.module("someModule", []);
// ./some/someCtrl.js
angular.module("someModule").controller("generalCtrl", ["$scope", function($scope) {
// code
}]);
// ./app.modules.js
var someModule = angular.module("someModule", []);
// ./some/someCtrl.js
someModule.controller("generalCtrl", ["$scope", function($scope) {
// code
}]);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question