this.route('browse', { path: '/points' }, function() {
this.route('quiz', { path: '/quiz' });
this.route('learn', { path: '/learn' });
});
this.route('post', { path: '/post' }, function() {
this.route('star', { path: '/star' });
this.route('marked', { path: '/marked' });
});
我想這樣做的原因是我想在嵌套的路線之間共享相同的基礎模板,我不把所有這些都放到應用程序模板中(否則我需要放置這麼多的條件塊)。如何設置與父路由相同級別的嵌套路由路徑?
我想才達到什麼是
browse -> /points
browse.quiz -> /quiz
browse.learn -> /learn
post -> /posts
post.star -> /star
post.marked -> /marked
有'templateName'財產的途徑。在'browse.quiz' route.js中,你可以說'templateName:'browse''。如果這不是你想要的,那麼你可能對'this.route('quiz',{resetNamespace:true})感興趣''再次'resetNamespace'不是好方法。 – kumkanillam