当我调用以下内容时:
this.get('controller').transitionToRoute('dashboards.submenu', {dashboard_id: "31", item_id: "97", subitem_id: "11"} );
我也试过:
this.get('controller').transitionToRoute('dashboards.submenu', dash, item, subitem);
没有成功...
我的网址是这样的:
localhost:9000/#/dashboards/undefined/undefined/undefined
不幸的是,我希望它是
localhost:9000/#/dashboards/31/97/11
知道为什么吗?
如果我直接去
localhost:9000/#/dashboards/31/97/11
它工作正常....
这是我的路由器……
App.Router.map(function () {
this.resource("index", { path: "/" });
this.resource("dashboards", { path: "/dashboards" } , function(){
this.route("main", { path: '/' });
this.route("index", { path: '/:dashboard_id' });
this.route("submenu", { path: '/:dashboard_id/:item_id/:subitem_id' });
});
});