的index.html :
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Let's learn Ember.js</title>
<script src="jquery-1.10.2.js"</script>
<script src="handlebars-1.1.2.js"</script>
<script src="ember-1.5.1.js"</script>
<script>
window.App = Ember.Application.create();
</script>
</head>
<body>
<script type="text/x-handlebars" data-template-name="index">
<h1>Welcome to Ember.js!</h1>
</script>
</body>
</html>
jquery,handlbars和ember 与 index.html 位于同一文件夹中。
当我在Chrome中打开index.html时(浏览器的地址行显示:file:///home/askar/work/ember/emberjs/index.html),在Inspect Element I'的控制台选项卡中得到错误:
Uncaught Error: Could not find module handlebars ember-1.5.1.js:251
requireModule ember-1.5.1.js:251
(anonymous function) ember-1.5.1.js:27031
(anonymous function) ember-1.5.1.js:27317
(anonymous function) ember-1.5.1.js:44267
我做错了什么?
无法找到任何相关帖子。
答案 0 :(得分:3)
这是因为您的脚本标记缺少结束尖括号。
试试这个:
<script src="jquery-1.10.2.js"></script>
<script src="handlebars-1.1.2.js"></script>
<script src="ember-1.5.1.js"></script>