我正在使用ember并将这些文件链接到我的index.html文件并在我的浏览器中运行。但是不能正常工作!请阅读我的代码并说明问题是由
ember code或我的浏览器。提前谢谢你
<!DOCTYPE HTML>
<html>
<head>
<title>Emberjs Test</title>
<!-- CDN's-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/3.0.1/handlebars.min.js"></script>
<script src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ember.js/1.10.0/ember.min.js"></script>
<script src="http://builds.emberjs.com/tags/v1.10.0-beta.3/ember-template-compiler.js"></script>
<script src="http://builds.emberjs.com/release/ember.debug.js"></script>
<script src="http://builds.emberjs.com/beta/ember-data.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
</head>
<body>
<script type="text/x-handlebars" data-template-name="application">
<p></p>
<div class="navbar">
</div>
<div class="container" style="background-color:Yellow;height:100px;text-align:center;padding:auto;">
<h3>Title Of Application By Ember.JS</h3>
</div>
<div class="container" style="background-color:pink">
{{outlet}}
</div>
<footer class="container" style="background-color:black;height:100px;"></footer>
</script>
<script type="text/x-handlebars" data-template-name="index">
<h1>Hello to everyone and Number That Be Sohown {{number}} </h1>
</script>
<script type="text/javascript">
var App=Ember.Application.create();
App.IndexController=Ember.Controller.extend({
number:10
});
</script>
</body>
</html>
答案 0 :(得分:1)
更改<head>
标记的内容:
<head>
<title>Emberjs Test</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="http://builds.emberjs.com/tags/v1.13.5/ember-template-compiler.js"></script>
<script src="http://builds.emberjs.com/tags/v1.13.5/ember.debug.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
</head>