I'm using the more verbose syntax to define modules and the app. I have blank HTML page that pulls in angular.js and then this file (app.js), and I get the error
Uncaught Error: Argument 'fn' is not a function, got string from testapp.
Do I have a typo, or misunderstand the parameters. Not sure what I am doing wrong.
file: app.js
angular.module('testappmon', []);
angular.module('testapp.controllers', []);
angular.module('testapp.services', []);
angular.module('testapp', ['testapp.controllers', 'testappmon', 'testapp.services'], function ($httpProvider) {
});
I'm using the more verbose syntax to define modules and the app. I have blank HTML page that pulls in angular.js and then this file (app.js), and I get the error
Uncaught Error: Argument 'fn' is not a function, got string from testapp.
Do I have a typo, or misunderstand the parameters. Not sure what I am doing wrong.
file: app.js
angular.module('testapp.mon', []);
angular.module('testapp.controllers', []);
angular.module('testapp.services', []);
angular.module('testapp', ['testapp.controllers', 'testapp.mon', 'testapp.services'], function ($httpProvider) {
});
Share
Improve this question
edited Feb 25, 2016 at 13:18
Glen Solsberry
12.3k16 gold badges73 silver badges96 bronze badges
asked Aug 13, 2013 at 14:44
BuddyJoeBuddyJoe
71.2k115 gold badges301 silver badges473 bronze badges
1 Answer
Reset to default 5This should some like this
angular.module('testapp.mon', []);
angular.module('testapp.controllers', []);
angular.module('testapp.services', []);
angular.module('testapp', ['testapp.controllers', 'testapp.mon', 'testapp.services'])
.config(['$routeProvider', '$httpProvider', function ($routeProvider, $httpProvider) {
}]);
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744885716a4599107.html
评论列表(0条)