I'm trying to understand emeber.js routing. I'm not really sure, why this is not valid definition of router
Platby.Router = Ember.Router.extend
location: 'hash'
enableLogging : true
root: Ember.Route.extend
index: Ember.Route.extend
route: '/'
initialState: 'batches'
enter: (router) -> console.log 'root.index'
batches: Ember.Route.extend
initialState: 'index'
route: '/batches'
enter: (router) -> console.log 'root.index.batches'
index: Ember.Route.extend
route: '/'
enter: (router) -> console.log 'root.index.batches.index'
Once proceed to the root url, I get the following output in the console.
STATEMANAGER: Entering root
STATEMANAGER: Sending event 'navigateAway' to state root.
STATEMANAGER: Sending event 'unroutePath' to state root.
STATEMANAGER: Sending event 'routePath' to state root.
Uncaught Error: assertion failed: Could not find state for path
Will be somebody able to explain me, where's the problem?