Getting Started: Changing router in 'displaying model data' raises errors


#1

So forgive me in advance, I’m obviously totally new to ember (and pretty new to JS in general as well. I’m going through the enhanced Getting Started tutorial, following it line by line, (unless I missed something) when my browser decides to render nothing but the background. I backtracked and noticed it happens immediately after altering the router as directed here: http://emberjs.com/guides/getting-started/displaying-model-data/

I commited and pushed to github here: https://github.com/justuseapen/ember_tut_mock

^The first commit rendered in the browser fine, the second commit is broken, if you want to see the difference.

This is my console output:

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 (file:///Users/Justus/Documents/code/ember_tut_mock/js/libs/ember.js:30519:13)
        at trigger (file:///Users/Justus/Documents/code/ember_tut_mock/js/libs/ember.js:29641:16)
        at handleError (file:///Users/Justus/Documents/code/ember_tut_mock/js/libs/ember.js:29903:9)
        at invokeCallback (file:///Users/Justus/Documents/code/ember_tut_mock/js/libs/ember.js:8055:19)
        at null.<anonymous> (file:///Users/Justus/Documents/code/ember_tut_mock/js/libs/ember.js:8109:11)
        at EventTarget.trigger (file:///Users/Justus/Documents/code/ember_tut_mock/js/libs/ember.js:7878:22)
        at file:///Users/Justus/Documents/code/ember_tut_mock/js/libs/ember.js:8180:17
        at Object.DeferredActionQueues.flush (file:///Users/Justus/Documents/code/ember_tut_mock/js/libs/ember.js:5459:24)
        at Object.Backburner.end (file:///Users/Justus/Documents/code/ember_tut_mock/js/libs/ember.js:5545:27) ember.js:394
Error while loading route: 
TypeError
 ember.js:394
Uncaught TypeError: Cannot set property 'store' of undefined 

any ideas are greatly appreciated.


#2

the problem is in first line

Uncaught ReferenceError: Todos is not defined todo.js:1

todo.js is called before application.js and router.js.