Ember.js 余烬向“ost”而不是“posts”发出get请求

Ember.js 余烬向“ost”而不是“posts”发出get请求,ember.js,Ember.js,一个灰烬noob问题——为了学习它,我正在尝试制作一个简单的博客应用程序。我试图加载一个帖子索引,但得到了错误 Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:3000/api/osts 这是有道理的,因为它应该是 http://localhost:3000/api/posts 我在这里犯了什么错误?-> Blog.Post = DS.Model.e

一个灰烬noob问题——为了学习它,我正在尝试制作一个简单的博客应用程序。我试图加载一个帖子索引,但得到了错误

Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:3000/api/osts
这是有道理的,因为它应该是

http://localhost:3000/api/posts
我在这里犯了什么错误?->

Blog.Post = DS.Model.extend({});

Blog.PostsRoute = Ember.Route.extend({
  model: function() {
    this.get('store').findAll('post')
  }
})

Blog.Router.map(function() {
  this.resource('posts');
});

Blog.Store = DS.Store.extend({
  adapter: 'Blog.ApplicationAdapter'
});

Blog.ApplicationAdapter = DS.RESTAdapter.extend({
    namespace: 'api'
})
我得换衣服

this.get('store').findAll('user');   


-.-

我在您发布的代码中没有看到任何错误。您可能只是在代码中的某个地方输入了一个小错误。你是直接复制粘贴到这里还是有其他代码?请尝试删除Blog.Store部分。我认为你不需要再那样做了。
this.get('store').findAll('User');