I am sure this will become clear as I dig deeper, but it is not yet clear how to do this.
I followed the information about this useful article on routing , but the important part is missing in this example, i.e. how do you get a home view for immediate rendering without clicking the home link?
I began to delve into the documents to try to understand this, but meanwhile it seems that a useful question answered the offspring.
I played with a working jsfiddle example from the above question here and comparing with this other example, I found that the work seems to work by default
This is still a mystery.
Current code :
App.Router = Em.Router.extend({ enableLogging: true, location: 'hash', root: Em.State.extend({
UPDATE: Solution
It turns out the reason I worked did not work because she was using Em.State.extend
and not Em.Route.extend
. The interesting part is that when I step by step and change them one by one, the example does not work until I change all of them.
Here is a working example :
App.Router = Em.Router.extend({ enableLogging: true, location: 'hash', root: Em.Route.extend({
source share