我正试着按照他们指南上的指示来学习安博。我已经创建了一个名为收藏夹(http://guides.emberjs.com/v1.13.0/concepts/naming-conventions/)的路由,但是我可以访问url http://localhost:port/favorites。
我是不是遗漏了什么?
这是我的router.js:
import Ember from 'ember';
import config from './config/environment';
var Router = Ember.Router.extend({
location: config.locationType
});
Router.map(function() {
this.route('favorites');
});
export default Router;我的favorites.hbs:
<ul>
{{#each favorites as |item|}}
<li>{{item.name}} - {{item.email}}</li>
{{/each}}
</ul>我把我的项目推到了这个GitHub回购上。
发布于 2015-07-22 06:43:59
在您的{{outlet}}模板中缺少了一个application.hbs助手。
Ember.js将将收藏夹模板呈现到应用程序模板中的{{ into }}。它将设置控制器的一个实例:收藏夹作为模板的控制器。
https://stackoverflow.com/questions/31547082
复制相似问题