0
如果我有兩個內容的邊欄,我如何使用路由,如果它在相同的層次結構,但不在相同的元素?Angular2使用2個側邊欄與路由
我想我不能使用其他<router-outlet>
的側邊欄,因爲他們是不一樣的和不應該顯示相同的內容
我找不出我應該怎麼得到這個工作。
我想正好有左邊與容器展示內容A和右側邊欄上的容器的側邊欄顯示內容B
這是我app.routing.ts文件
const APP_ROUTES: Routes = [
{ path: '', redirectTo: '/Roulette', pathMatch: 'full' },
{ path: 'Roulette', component: RouletteComponent },
{ path: 'Jackpot', component: JackpotComponent },
{ path: 'Dice', component: DiceComponent },
{ path: 'Crash', component: CrashComponent },
{ path: 'Bingo', component: BingoComponent },
{ path: 'Chat', component: ChatComponent },
{ path: 'Account', component: AccountComponent }
]
等待,實際上工作?所以我可以在同一個component.html中使用3個插座?哇,很好,謝謝你,我現在會嘗試一下,如果我能正常工作,請給我反饋。非常感謝! – Prototype
@Prototype,增加了一個Plunker的例子,乾杯! –
工程就像一個魅力!非常感謝!拯救了我的一天和很多令人頭疼的時刻:) – Prototype