【发布时间】:2015-01-10 21:41:49
【问题描述】:
请帮助了解问题所在。我对 AngularJS 很陌生,也许我错过了一些东西。 这是我的简单 HTML:
<!DOCTYPE html>
<html>
<script type="text/javascript" src="angular.js"></script>
<script type="text/javascript" src="app.js"></script>
</head>
<body ng-app="myApp">
</body>
</html>
JS
(function(){
var app = angular.module('myApp',[]);
});
以及所有时间错误:
未捕获的错误:[$injector:modulerr] 无法实例化模块 myApp,原因如下:
错误:[$injector:nomod] 模块“myApp”不可用!您要么拼错了模块名称,要么忘记加载它。如果注册模块,请确保将依赖项指定为第二个参数。
【问题讨论】:
标签: javascript angularjs