-
-
Notifications
You must be signed in to change notification settings - Fork 241
/
Copy pathapp.routing.ts
45 lines (42 loc) · 1.73 KB
/
app.routing.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import { NgModule } from "@angular/core";
import { NativeScriptRouterModule } from "nativescript-angular/router";
import { Routes } from "@angular/router";
import { HomeComponent } from "./home/home.component";
import { SecondComponent } from "./second/second.component";
import { ModalSecondComponent } from "./modal-second/modal-second.component";
import { ModalComponent } from "./modal/modal.component";
import { NestedModalComponent } from "./modal-nested/modal-nested.component";
import { ModalViewContentComponent } from "./modal-shared/modal-view-content.component";
import { ModalSharedSecondComponent } from "./modal-shared/modal-shared-second.component";
const routes: Routes = [
{ path: "", redirectTo: "/home", pathMatch: "full" },
{
path: "home", component: HomeComponent, children: [
{
path: "modal", component: ModalComponent, children: [
{ path: "nested-frame-modal", component: NestedModalComponent }]
},
{ path: "modal-second", component: ModalSecondComponent }
]
},
{
path: "second", component: SecondComponent, children: [
{
path: "modal", component: ModalComponent, children: [
{ path: "nested-frame-modal", component: NestedModalComponent }]
},
{ path: "modal-second", component: ModalSecondComponent }
]
},
{
path: "modal-shared", component: ModalViewContentComponent, outlet: "modalOutlet"
},
{
path: "modal-shared-second-host", component: ModalSharedSecondComponent
}
];
@NgModule({
imports: [NativeScriptRouterModule.forRoot(routes)],
exports: [NativeScriptRouterModule]
})
export class AppRoutingModule { }