Javascript ember教程入门:在';显示模型数据';引起错误

Javascript ember教程入门:在';显示模型数据';引起错误,javascript,ember.js,Javascript,Ember.js,所以请提前原谅我,我对ember显然是全新的(对JS来说也是全新的。我正在一行一行地学习增强版入门教程,(除非我错过了什么)当我的浏览器决定只渲染背景时。我回过头来,注意到它在按照此处的指示更改路由器后立即发生: 我在这里提交并推送到github: ^如果希望看到差异,则在浏览器中呈现的第一次提交将很好,第二次提交将被中断 这是我的控制台输出: Uncaught ReferenceError: Todos is not defined todo.js:1 DEBUG: -------------

所以请提前原谅我,我对ember显然是全新的(对JS来说也是全新的。我正在一行一行地学习增强版入门教程,(除非我错过了什么)当我的浏览器决定只渲染背景时。我回过头来,注意到它在按照此处的指示更改路由器后立即发生:

我在这里提交并推送到github:

^如果希望看到差异,则在浏览器中呈现的第一次提交将很好,第二次提交将被中断

这是我的控制台输出:

Uncaught ReferenceError: Todos is not defined todo.js:1
DEBUG: ------------------------------- ember.js:394
DEBUG: Ember.VERSION : 1.0.0 ember.js:394
DEBUG: Handlebars.VERSION : 1.0.0 ember.js:394
DEBUG: jQuery.VERSION : 1.10.2 ember.js:394
DEBUG: ------------------------------- ember.js:394
event.returnValue is deprecated. Please use the standard event.preventDefault() instead.
Assertion failed: No model was found for 'todo' ember.js:394
(anonymous function) ember.js:394
DEPRECATION: Action handlers contained in an `events` object are deprecated in favor of 

putting them in an `actions` object (error on <Ember.Route:ember222>)
            at Object.triggerEvent
Error while loading route: 
TypeError
 ember.js:394
Uncaught TypeError: Cannot set property 'store' of undefined 

This is the router.js that breaks the code:
Todos.Router.map(function () {
  this.resource('todos', { path: '/' });
});

Todos.TodosRoute = Ember.Route.extend({
  model: function () {
    return this.store.find('todo');
  }
});

非常感谢您的任何想法。

这是该版本的余烬数据(可能是余烬/余烬数据)中的一个缺陷

Todos.Todo = DS.Model.extend({
  title: DS.attr('string'),
  isCompleted: DS.attr('boolean')
});

Todos.Todo.FIXTURES = [
 {
   id: 1,
   title: 'Learn Ember.js',
   isCompleted: true
 },
 {
   id: 2,
   title: '...',
   isCompleted: false
 },
 {
   id: 3,
   title: 'Profit!',
   isCompleted: false
 }
];