Skip to content

Commit fc1df26

Browse files
authored
test: using nsRouterLink with relative route (#16)
1 parent 9d38f36 commit fc1df26

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

app/app.routes.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ export const routes = [
4444
routeEntry({ path: "binding", component: BindingComponent, data: { title: "Binding", isNavigatable: true} }),
4545

4646
routeEntry({ path: "ListViewExamples", component: ListViewMainPageComponent, data: { title: "ListViewExamples", isNavigatable: true} }),
47-
routeEntry({ path: "listView/commonTemplate", component: ListViewComponent, data: { title: "commonTemplate" } }),
48-
routeEntry({ path: "listView/customTemplate", component: ListViewControlComponent, data: { title: "customTemplate" } }),
47+
routeEntry({ path: "ListViewExamples/commonTemplate", component: ListViewComponent, data: { title: "commonTemplate" } }),
48+
routeEntry({ path: "ListViewExamples/customTemplate", component: ListViewControlComponent, data: { title: "customTemplate" } }),
4949
routeEntry({ path: "listView/asyncPipeTemplate", component: ListViewAsyncPipeComponent, data: { title: "asyncPipeTemplate" } }),
5050
routeEntry({ path: "listView/nestedTemplate", component: ListViewWithNestedTemplateComponent, data: { title: "nestedTemplate" } }),
5151

app/listView/listViewMainPage/list-view-main-page.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ import { Component } from "@angular/core";
44
selector: "main",
55
template: `
66
<StackLayout>
7-
<Button text="ListView" [nsRouterLink]="['/listView','commonTemplate']"></Button>
8-
<Button text="ListViewCustomTemplate" [nsRouterLink]="['/listView','customTemplate']"></Button>
9-
<Button text="ListViewAsyncPipe" [nsRouterLink]="['/listView','asyncPipeTemplate']"></Button>
10-
<Button text="NestedTemplate" [nsRouterLink]="['/listView','nestedTemplate']"></Button>
11-
</StackLayout>
7+
<Button text="ListView" [nsRouterLink]="'commonTemplate'"></Button>
8+
<Button text="ListViewCustomTemplate" [nsRouterLink]="'customTemplate'"></Button>
9+
<Button text="ListViewAsyncPipe" [nsRouterLink]="['/listView','asyncPipeTemplate']"></Button>
10+
<Button text="NestedTemplate" [nsRouterLink]="['/listView','nestedTemplate']"></Button>
11+
</StackLayout>
1212
`,
1313
})
1414
export class ListViewMainPageComponent { }

0 commit comments

Comments
 (0)