Ember.js 没有资源“发布”余烬应用程序
我正在从主干网转移到余烬,并开始尝试制作一个博客应用程序 我得到了错误-Ember.js 没有资源“发布”余烬应用程序,ember.js,Ember.js,我正在从主干网转移到余烬,并开始尝试制作一个博客应用程序 我得到了错误- Uncaught Error: Assertion Failed: The attempt to link-to route 'posts' failed. The router did not find 'posts' in its possible routes: 'loading', 'error', 'index', 'application' 这就是我到目前为止所做的- Blog.Router.map = f
Uncaught Error: Assertion Failed: The attempt to link-to route 'posts' failed. The router did not find 'posts' in its possible routes: 'loading', 'error', 'index', 'application'
这就是我到目前为止所做的-
Blog.Router.map = function() {
this.resource('posts');
}
Blog.PostsRoute = Ember.Route.extend({
model: function() {
this.get('store').findAll('post')
}
})
Blog.Post = DS.Model.extend({
name: DS.attr('string')
});
映射是一个函数,而不是您设置的属性
Blog.Router.map( function() {
this.resource('posts');
});