update router
This commit is contained in:
parent
5ca76d76bc
commit
41a20dee68
@ -46,15 +46,7 @@ import {PaymentDemoComponent} from './demo/view/menu/paymentdemo.component';
|
||||
{path: 'uikit/panel', component: PanelsDemoComponent},
|
||||
{path: 'uikit/overlay', component: OverlaysDemoComponent},
|
||||
{path: 'uikit/media', component: MediaDemoComponent},
|
||||
{path: 'uikit/menu', component: MenusDemoComponent,
|
||||
children: [
|
||||
{path:'', redirectTo: 'personal', pathMatch: 'full'},
|
||||
{path: 'personal', component: PersonalDemoComponent},
|
||||
{path:'seat', component: SeatDemoComponent},
|
||||
{path:'payment', component: PaymentDemoComponent},
|
||||
{path:'confirmation', component: ConfirmationDemoComponent},
|
||||
]
|
||||
},
|
||||
{path: 'uikit/menu', loadChildren: () => import('./demo/view/menu/menudemo.module').then(m => m.MenudemoModule)},
|
||||
{path: 'uikit/message', component: MessagesDemoComponent},
|
||||
{path: 'uikit/misc', component: MiscDemoComponent},
|
||||
{path: 'uikit/charts', component: ChartsDemoComponent},
|
||||
|
27
src/app/demo/view/menu/menudemo.module.ts
Normal file
27
src/app/demo/view/menu/menudemo.module.ts
Normal file
@ -0,0 +1,27 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
|
||||
import { PaymentDemoComponent } from './paymentdemo.component';
|
||||
import {SeatDemoComponent} from './seatdemo.component';
|
||||
import {PersonalDemoComponent} from './personaldemo.component';
|
||||
import {ConfirmationDemoComponent} from './confirmationdemo.component';
|
||||
import { MenusDemoComponent } from '../menusdemo.component';
|
||||
|
||||
@NgModule({
|
||||
declarations: [],
|
||||
imports: [
|
||||
CommonModule,
|
||||
RouterModule.forChild([
|
||||
{path:'',component: MenusDemoComponent, children:[
|
||||
{path:'', redirectTo: 'personal', pathMatch: 'full'},
|
||||
{path: 'personal', component: PersonalDemoComponent},
|
||||
{path: 'confirmation', component: ConfirmationDemoComponent},
|
||||
{path: 'seat', component: SeatDemoComponent},
|
||||
{path: 'payment', component: PaymentDemoComponent}
|
||||
]}
|
||||
])
|
||||
],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
export class MenudemoModule { }
|
@ -23,7 +23,8 @@
|
||||
<div class="col-12 md:col-6">
|
||||
<div class="card card-w-title">
|
||||
<h5>Steps</h5>
|
||||
<p-steps [model]="routeItems" [readonly]="false" (activeIndexChange)="pageIndex = $event" [activeIndex]="pageIndex"></p-steps>
|
||||
<p>Steps and TabMenu are integrated with the same child routes.</p>
|
||||
<p-steps [model]="routeItems" [readonly]="false"></p-steps>
|
||||
<router-outlet></router-outlet>
|
||||
</div>
|
||||
</div>
|
||||
@ -31,6 +32,7 @@
|
||||
<div class="col-12 md:col-6">
|
||||
<div class="card card-w-title">
|
||||
<h5>TabMenu</h5>
|
||||
<p>Steps and TabMenu are integrated with the same child routes.</p>
|
||||
<p-tabMenu [model]="routeItems"></p-tabMenu>
|
||||
<router-outlet></router-outlet>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user