admin管理员组文章数量:1430744
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) {
}]);
本文标签:
版权声明:本文标题:javascript - Defining The Initial App in AngularJS - Argument 'fn' is not a function, got string - Stack Overflo 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744885716a2630474.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论