我在EmberJs为"Hello World"
印刷书写第一个程序,但得到的错误。有人可以帮我吗?的Hello World在EmberJs错误
HTML
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.5/handlebars.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ember.js/2.7.0/ember.min.js"></script>
<script>
App = Ember.Application.create();
App.Router.map(function() {
this.resource('index', { path: '/' }, function() {});
this.resource('hi', { path: '/hi' }, function() {});
});
</script>
<script type="text/x-handlebars" data-template-name='index'>
<p>index!</p>
<p>{{#linkTo hi}}hi{{/linkTo}}</p>
</script>
<script type="text/x-handlebars" data-template-name='hi'>
hello world!
</script>
</head>
<body>
</body>
</html>
错误
从Ember 2开始,开发Ember应用程序的首选方法是使用[ember-cli](https://ember-cli.com/)工作流,通过包含所有必需的东西来防止这种错误建立你的项目。 [汤姆戴尔(http://stackoverflow.com/users/926126/tom-dale)中提到了这一点[之路灰烬2.0 RFC(https://github.com/emberjs/rfcs/pull/15 )。 我想你应该在灰烬环境你的第一个步骤,看看[灰烬快速启动(https://guides.emberjs.com/v2.7.0/getting-started/quick-start/),它涵盖_Hello world_应用程序的所有内容。 – damienc