4fc21097
Arsisakarn Srilatanart
first commit
|
1
2
3
4
5
6
|
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { WizardBaseComponent } from './wizard-base/wizard-base.component';
import { ModalOneComponent } from './wizard-base/modal-one/modal-one.component';
import { ModalTwoComponent } from './wizard-base/modal-two/modal-two.component';
|
522b64d0
Arsisakarn Srilatanart
ทำให้ parent comp...
|
7
|
import { DummyComponent } from './dummy/dummy.component';
|
2ce2db7f
Arsisakarn Srilatanart
แยก layout สำหรับ...
|
8
9
10
|
import { LayoutUiComponent } from './layouts/ui.component';
import { LayoutPrintComponent } from './layouts/print.component';
import { InvoiceComponent } from './invoice/invoice.component';
|
4fc21097
Arsisakarn Srilatanart
first commit
|
11
12
|
const routes: Routes = [
|
2ce2db7f
Arsisakarn Srilatanart
แยก layout สำหรับ...
|
13
|
{ path: '', redirectTo: '/wizard', pathMatch: 'full' },
|
4fc21097
Arsisakarn Srilatanart
first commit
|
14
|
{
|
2ce2db7f
Arsisakarn Srilatanart
แยก layout สำหรับ...
|
15
16
|
path: '',
component: LayoutUiComponent,
|
4fc21097
Arsisakarn Srilatanart
first commit
|
17
|
children: [
|
2ce2db7f
Arsisakarn Srilatanart
แยก layout สำหรับ...
|
18
19
20
21
22
23
24
25
26
27
28
29
|
{
path: 'wizard',
component: WizardBaseComponent,
children: [
{ path: '1', component: ModalOneComponent },
{ path: '2', component: ModalTwoComponent },
]
},
{
path: 'dummy',
component: DummyComponent
},
|
4fc21097
Arsisakarn Srilatanart
first commit
|
30
31
|
]
},
|
522b64d0
Arsisakarn Srilatanart
ทำให้ parent comp...
|
32
|
{
|
2ce2db7f
Arsisakarn Srilatanart
แยก layout สำหรับ...
|
33
34
35
36
37
38
|
path: 'print',
component: LayoutPrintComponent,
children: [
{ path: 'invoice', component: InvoiceComponent },
],
}
|
4fc21097
Arsisakarn Srilatanart
first commit
|
39
40
41
|
];
@NgModule({
|
2ce2db7f
Arsisakarn Srilatanart
แยก layout สำหรับ...
|
42
|
imports: [ RouterModule.forRoot(routes, { useHash: true }) ],
|
4fc21097
Arsisakarn Srilatanart
first commit
|
43
44
45
46
|
exports: [ RouterModule ]
})
export class AppRoutingModule {
}
|