如何链接到应用程序的根路径

Wil*_*Wit 9 ember.js

我找不到如何链接到我的Ember应用程序的根路径.我尝试过:{{#link-to 'index'}}Home{{/link-to}}但是在我的控制台中我得到了异常: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'

当我尝试时也一样 {{link-to 'application'}}

这是我的路由器:

App.Router.map(function() {
  this.resource('start', { path: '/start' }, function() {
    //.. sub routes ..
  });
  this.resource('intro', { path: '/' }, function() {
    // ...
  });
  this.route('login')
});
Run Code Online (Sandbox Code Playgroud)

Kin*_*n2k 28

根据您使用的版本,它index现在用于支持现在application也可用于链接回根目录.

{{link-to 'Back to Home' 'application' }}

{{link-to 'Back to Home 2' 'index' }}
Run Code Online (Sandbox Code Playgroud)

http://emberjs.jsbin.com/OxIDiVU/188/edit