I can't find how to make a link to the root route of my Ember app.
I tried: {{#link-to 'index'}}Home{{/link-to}}
, but in my console I get the exception: Assertion failed: The attempt to link-to route 'index' failed (also tried 'index.index'). The router did not find 'index' in its possible routes: 'loading', 'error', 'start.loading', 'start.error'
The same when I try {{link-to 'application'}}
This is my router:
App.Router.map(function() {
this.resource('start', { path: '/start' }, function() {
//.. sub routes ..
});
this.resource('intro', { path: '/' }, function() {
// ...
});
this.route('login')
});
Depending on what version you're using it used to just support index
now application
works as well for linking back to the root.
{{link-to 'Back to Home' 'application' }}
{{link-to 'Back to Home 2' 'index' }}
http://emberjs.jsbin.com/OxIDiVU/188/edit
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With