Skip to content

Commit feea2e8

Browse files
author
Alexander Vakrilov
authored
Merge pull request #3 from NativeScript/navigation-fix
Use absolute paths where possible - bug workaround
2 parents 6ab5b1b + e429bfe commit feea2e8

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

Diff for: app/action-bar/action-bar-first.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {NS_ROUTER_DIRECTIVES} from "nativescript-angular/router";
66
directives: [NS_ROUTER_DIRECTIVES],
77
template: `
88
<ActionBar title="Title 1" automationText="title">
9-
<ActionItem *ngIf="show" text="action" (tap)="onTap()" [nsRouterLink]="['../second']"
9+
<ActionItem *ngIf="show" text="action" (tap)="onTap()" [nsRouterLink]="['/second']"
1010
automationText="action"></ActionItem>
1111
<ActionItem (tap)="onShare()" ios.systemIcon="9" ios.position="left"
1212
android.systemIcon="ic_menu_share_holo_light" android.position="actionBar"

Diff for: app/listView/listViewMainPage/list-view-main-page.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import { NS_ROUTER_DIRECTIVES } from "nativescript-angular/router";
66
directives: [NS_ROUTER_DIRECTIVES],
77
template: `
88
<StackLayout>
9-
<Button text="ListView" [nsRouterLink]="['./commonTemplate']"></Button>
10-
<Button text="ListViewCustomTemplate" [nsRouterLink]="['./customTemplate']"></Button>
11-
<Button text="ListViewAsyncPipe" [nsRouterLink]="['./asyncPipeTemplate']"></Button>
9+
<Button text="ListView" [nsRouterLink]="['/listView','commonTemplate']"></Button>
10+
<Button text="ListViewCustomTemplate" [nsRouterLink]="['/listView','customTemplate']"></Button>
11+
<Button text="ListViewAsyncPipe" [nsRouterLink]="['/listView','asyncPipeTemplate']"></Button>
1212
</StackLayout>
1313
`,
1414
})

Diff for: app/main/main-page-router-outlet.ts

+10-10
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,27 @@ import { ModalTest, ModalTestWithPushStrategy } from "../modal/modal-dialog.comp
2828
<Label text="Main Component" class="title"></Label>
2929
3030
<StackLayout orientation="horizontal" horizontalAlignment="center">
31-
<Button text="Template" [nsRouterLink]="['template']"></Button>
32-
<Button text="Router" [nsRouterLink]="['router']"></Button>
31+
<Button text="Template" [nsRouterLink]="['/template']"></Button>
32+
<Button text="Router" [nsRouterLink]="['/router']"></Button>
3333
</StackLayout>
3434
3535
<StackLayout orientation="horizontal" horizontalAlignment="center">
36-
<Button text="First" [nsRouterLink]="['first']"></Button>
37-
<Button text="Second" [nsRouterLink]="['second']"></Button>
36+
<Button text="First" [nsRouterLink]="['/first']"></Button>
37+
<Button text="Second" [nsRouterLink]="['/second']"></Button>
3838
</StackLayout>
3939
4040
<StackLayout orientation="horizontal" horizontalAlignment="center">
41-
<Button text="ActionBar1" [nsRouterLink]="['first-action-bar']"></Button>
42-
<Button text="ActionBar2" [nsRouterLink]="['second-action-bar']"></Button>
41+
<Button text="ActionBar1" [nsRouterLink]="['/first-action-bar']"></Button>
42+
<Button text="ActionBar2" [nsRouterLink]="['/second-action-bar']"></Button>
4343
</StackLayout>
4444
45-
<Button text="Binding" [nsRouterLink]="['binding']"></Button>
45+
<Button text="Binding" [nsRouterLink]="['/binding']"></Button>
4646
47-
<Button text="ListViewExamples" [nsRouterLink]="['listView']"></Button>
47+
<Button text="ListViewExamples" [nsRouterLink]="['/listView']"></Button>
4848
4949
<StackLayout orientation="horizontal" horizontalAlignment="center">
50-
<Button text="modal" [nsRouterLink]="['modal']"></Button>
51-
<Button text="modal(onPush)" [nsRouterLink]="['modal-on-push']"></Button>
50+
<Button text="modal" [nsRouterLink]="['/modal']"></Button>
51+
<Button text="modal(onPush)" [nsRouterLink]="['/modal-on-push']"></Button>
5252
</StackLayout>
5353
</StackLayout>
5454
`,

Diff for: package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"version": "2.0.1"
1010
},
1111
"tns-android": {
12-
"version": "2.1.0"
12+
"version": "2.1.1"
1313
}
1414
},
1515
"dependencies": {
@@ -21,7 +21,7 @@
2121
"@angular/platform-server": "2.0.0-rc.3",
2222
"@angular/router-deprecated": "2.0.0-rc.2",
2323
"@angular/router": "3.0.0-alpha.7",
24-
"nativescript-angular": "^0.1.8",
24+
"nativescript-angular": "^0.2.0",
2525
"tns-core-modules": "^2.0.0 || 2.0.0-angular-7"
2626
},
2727
"devDependencies": {

0 commit comments

Comments
 (0)