0
当我开始学习EmberJS,我看到这个错误在控制台:错误控制台包括图书馆
Uncaught TypeError: Cannot call method 'proto' of undefined ember-1.0.pre.min.js:17
似乎只是包括图书馆我得到这个错误。有谁知道我为什么这么做?
编辑:添加HTML标记
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<meta name="description" content="">
<meta name="author" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="/favicon.ico">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
<link rel="stylesheet" href="css/style.css?v=2">
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<script type="text/x-handlebars">
{{#view App.MyView}}
<h1>Hello world!</h1>
{{/view}}
</script>
<!-- The missing protocol means that it will match the current protocol, either http or https. If running locally, we use the local jQuery. -->
<script src="js/libs/jquery-1.7.2.min.js"></script>
<script>window.jQuery || document.write('<script src="js/libs/jquery-1.7.2.min.js"><\/script>')</script>
<script src="js/libs/handlebars-1.0.0.beta.6.js"></script>
<script src="js/libs/ember-1.0.pre.js"></script>
<script src="js/app.js"></script>
</body>
</html>
也有这个JS在app.js
文件:
var App = Em.Application.create();
App.MyView = Em.View.extend({
mouseDown: function() {
window.alert("hello world!");
}
});
,但它已被删除,所有的模板部分从HTML为好,和我仍然有相同的错误(:
很难说没有更多的上下文发生了什么...... –
@ sly7_7 - 就是这样...没有其他东西了,只是一个简单的index.html文件,其中包含jquery和handlebars库( : – Roland
你可以尝试使用非缩小版本,看看什么是未定义的? –