0
我在我的routes.js文件中有多條路線,我想向其中引入一個額外的字段。下面是路由流星路線中的自定義字段
Router.route('/', {
name: 'home',
controller: 'LoginController',
where: 'client',
action:'index'
});
,因爲我有許多途徑,我想通過所有路線,並得到路由名這樣
_.each(Router.routes, function(route){
console.log(route.getName());
});
我想使用的路線名稱生成鏈接。鏈接需要鏈接名稱,我有將鏈接名稱放在路由中的想法。
Router.route('/', {
name: 'home',
controller: 'LoginController',
where: 'client',
text: 'Login Link',
action:'index'
});
在流星允許的路線中引入自定義字段?