Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to link to root route of application

Tags:

ember.js

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')
});
like image 832
Willem de Wit Avatar asked Feb 04 '14 13:02

Willem de Wit


1 Answers

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

like image 119
Kingpin2k Avatar answered Sep 23 '22 16:09

Kingpin2k