默认情况下如何设置路由路径?

时间:2019-02-04 21:35:28

标签: angular

SELECT * FROM wn_trailer t INNER JOIN (SELECT trailer_id, MAX(last_update) as max_last_update FROM wn_trailer_history GROUP BY trailer_id ) tht ON t.id = tht.trailer_id INNER JOIN wn_trailer_history th ON th.trailer_id = tht.trailer_id AND th.last_update = tht.max_last_update INNER JOIN wn_trailer_status ts ON ts.id = th.trailer_status INNER JOIN wn_users u ON u.id = th.trailer_assigned ORDER BY trailer_number ASC; 中有两条路线:

AppRoutingModule

如果用户进入根URL,如何默认设置其中之一:{ path: "list", component: ListComponent }, { path: "drops", component: DropsComponent } 而是具体路径http://localhttp://local/list

1 个答案:

答案 0 :(得分:1)

您可以将''redirectTo添加在一起,注意pathMatch:full

{ path: '', redirectTo: 'list', pathMatch: 'full' },
{ path: "list", component: ListComponent },
{ path: "drops", component: DropsComponent }