簡體   English   中英

一種使用Angular Material選項卡更新Url的方法

[英]A way to update Url with Angular Material Tabs

Angular 6使用Angular Material,顯示一個列表,使用制表符進入項目詳細信息“page”。

路線

我的路線很簡單:

{
    path: '', component: CurrenciesComponent
}

我試過這樣的事情:

{
    path: 'currencies',
    canActivate: [AuthGuard],
    component: CurrenciesComponent,
    children: [
        { path: 'currencies/:id', component: CurrenciesDetailComponent }
    ]
}

我搜索找到一個解決方案,但沒有什么可以解決它。 也許這不可能使用Material Tabs?

要使用帶有路徑的選項卡模式,請使用mat-tab-nav-barmat-tab-link指令。 關於此問題的文檔不多: https//material.angular.io/components/tabs/overview#tabs-and-navigation

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM