我跟隨one of the Ember Guides on routing(v2.14.0),我試圖建立一個嵌套的子路由,其中索引路由應該重定向到不同的子路由。EmberJS嵌套子路由自定義索引路徑不按預期方式工作
Router.map(function() {
this.route('about');
this.route('dashboard', function() {
this.route('index', { path: '/dashboard/calendar'});
// ^should direct all dashboard index requests to dashboard/calendar right?
// setting path = '/calendar' also doesn't work
this.route('calendar');
this.route('daily-journal');
});
});
然而,當我加載http://localhost:3000/dashboard
,我得到這個錯誤:
任何想法,我做錯了什麼?
顯示的'鏈接to'? – sheriffderek
我沒有使用'link-to',我直接在Chrome中加入'localhost:3000/dashboard' – Sticky