I downloaded the Ember.js starter kit from https://github.com/emberjs/starter-kit
I have not edited any of the files. Whether I open the included index.html from file or over a server (SimpleHTTPServer), the h2
"Welcome to Ember.js" does not appear in the browser:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Ember Starter Kit</title>
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<script type="text/x-handlebars">
<h2>Welcome to Ember.js</h2>
{{outlet}}
</script>
<script type="text/x-handlebars" id="index">
<ul>
{{#each item in model}}
<li>{{item}}</li>
{{/each}}
</ul>
</script>
<script src="js/libs/jquery-1.10.2.js"></script>
<script src="js/libs/ember-template-compiler-1.11.0.js"></script>
<script src="js/libs/ember-1.11.0.js"></script>
<script src="js/app.js"></script>
<!-- to activate the test runner, add the "?test" query string parameter -->
<script src="tests/runner.js"></script>
</body>
</html>
The ul
works perfectly. Why doesn't the h2
?
I think this is some regression in Ember 1.11.0. I updated both ember and ember-template-compiler to the latest release and it seems to work. You can get these from here.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.