Skip to content

Commit 426f25a

Browse files
Vasil ChimevVasil Chimev
Vasil Chimev
authored and
Vasil Chimev
committed
Merge pull request #1 from NativeScript/act-bar
Clean up ActionBar test
2 parents 2d2970e + 260162d commit 426f25a

File tree

2 files changed

+3
-127
lines changed

2 files changed

+3
-127
lines changed

app/action-bar/action-bar-test.ts

Lines changed: 0 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -4,129 +4,6 @@ import {NS_ROUTER_DIRECTIVES} from "nativescript-angular/router/ns-router";
44
import {FirstComponentActionBar} from "./action-bar-first.component";
55
import {SecondComponentActionBar} from "./action-bar-second.component";
66

7-
// @Component({
8-
// selector: "first",
9-
// directives: [NS_ROUTER_DIRECTIVES],
10-
// template: `
11-
// <ActionBar title="Title 1">
12-
// <ActionItem *ngIf="show" text="action" (tap)="onTap()" [nsRouterLink]="['Second']"></ActionItem>
13-
// <ActionItem (tap)="onShare()" ios.systemIcon="9" ios.position="left"
14-
// android.systemIcon="ic_menu_share_holo_light" android.position="actionBar"></ActionItem>
15-
// <ActionItem (tap)="onDelete()" ios.systemIcon="16" ios.position="right"
16-
// android.position="popup" text="delete"></ActionItem>
17-
// </ActionBar>
18-
19-
// <StackLayout verticalAlignment="center">
20-
// <Label [text]="messageShare"></Label>
21-
// <Label [text]="messageDelete"></Label>
22-
// </StackLayout>
23-
// `,
24-
// })
25-
// export class FirstComponentActionBar {
26-
27-
// public counterShare: number = 0;
28-
// public counterDelete: number = 0;
29-
// public show: boolean = true;
30-
31-
// public get messageShare(): string {
32-
// if (this.counterShare == 1) {
33-
// return this.counterShare + " share tap";
34-
// } else {
35-
// return this.counterShare + " share taps";
36-
// }
37-
// }
38-
39-
// public get messageDelete(): string {
40-
// if (this.counterDelete == 1) {
41-
// return this.counterDelete + " delete tap";
42-
// } else {
43-
// return this.counterDelete + " delete taps";
44-
// }
45-
// }
46-
47-
// public onShare() {
48-
// this.counterShare++;
49-
// console.log("Share button tapped!");
50-
// }
51-
52-
// public onTap() {
53-
// console.log("FirstComponent.Tapped!");
54-
// }
55-
56-
// public onDelete() {
57-
// this.counterDelete++;
58-
// console.log("Delete button tapped!");
59-
// }
60-
// }
61-
62-
// @Component({
63-
// selector: "nested-component",
64-
// directives: [NS_ROUTER_DIRECTIVES],
65-
// template: `
66-
// <ActionBarExtension>
67-
// <ActionItem *ngIf="show" (tap)="onTap()">
68-
// <Button text="CUSTOM"></Button>
69-
// </ActionItem>
70-
// </ActionBarExtension>
71-
72-
// <StackLayout orientation="horizontal" horizontalAlignment="center">
73-
// <Button [text]="show ? 'hide' : 'show'" (tap)="show = !show"></Button>
74-
// <Label [text]="message"></Label>
75-
// </StackLayout>
76-
// `,
77-
// })
78-
// class NestedComponent {
79-
80-
// public counter: number = 0;
81-
// public show: boolean = true;
82-
83-
// public get message(): string {
84-
// if (this.counter == 1) {
85-
// return this.counter + " custom tap";
86-
// } else {
87-
// return this.counter + " custom taps";
88-
// }
89-
// }
90-
91-
// public onTap() {
92-
// this.counter++;
93-
// console.log("NestedComponent.Tapped!");
94-
// }
95-
// }
96-
97-
// @Component({
98-
// selector: "second",
99-
// directives: [NS_ROUTER_DIRECTIVES, NestedComponent],
100-
// template: `
101-
// <ActionBar title="Title 2">
102-
// <NavigationButton text="First" android.systemIcon="ic_menu_back"></NavigationButton>
103-
// <ActionItem [text]="message"></ActionItem>
104-
// <ActionItem text="TAP" (tap)="onTap()"></ActionItem>
105-
// </ActionBar>
106-
107-
// <StackLayout verticalAlignment="center">
108-
// <nested-component></nested-component>
109-
// </StackLayout>
110-
// `,
111-
// })
112-
// export class SecondComponentActionBar {
113-
114-
// public counter: number = 0;
115-
116-
// public get message(): string {
117-
// if (this.counter == 1) {
118-
// return this.counter + " tap";
119-
// } else {
120-
// return this.counter + " taps";
121-
// }
122-
// }
123-
124-
// public onTap() {
125-
// this.counter++;
126-
// console.log("SecondComponent.Tapped!");
127-
// }
128-
// }
129-
1307
@Component({
1318
selector: 'action-bar-test',
1329
directives: [NS_ROUTER_DIRECTIVES],

app/main/main-page-router-outlet.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import {BindingComponent} from "../binding/binding-page";
2020
<Button text="First" [nsRouterLink]="['First']"></Button>
2121
<Button text="Second" [nsRouterLink]="['Second']"></Button>
2222
<Button text="Router" [nsRouterLink]="['Router']"></Button>
23-
<Button text="ActionBar" [nsRouterLink]="['ActionBar']"></Button>
23+
<!--<Button text="ActionBar" [nsRouterLink]="['ActionBar']"></Button>-->
2424
<StackLayout orientation="horizontal" horizontalAlignment="center">
2525
<Button text="ActionBar1" [nsRouterLink]="['FirstActionBar']"></Button>
2626
<Button text="ActionBar2" [nsRouterLink]="['SecondActionBar']"></Button>
@@ -42,11 +42,10 @@ class MainComponent { }
4242
{ path: '/first', component: FirstComponent, name: 'First' },
4343
{ path: '/second', component: SecondComponent, name: 'Second' },
4444
{ path: '/router/...', component: NavigationTestRouter, name: 'Router' },
45-
{ path: '/action-bar-test/...', component: ActionBarTest, name: 'ActionBar' },
45+
// { path: '/action-bar-test/...', component: ActionBarTest, name: 'ActionBar' },
4646
{ path: '/first-action-bar', component: FirstComponentActionBar, name: 'FirstActionBar' },
4747
{ path: '/second-action-bar', component: SecondComponentActionBar, name: 'SecondActionBar' },
4848
{ path: '/binding', component: BindingComponent, name: 'Binding' },
49-
50-
49+
5150
])
5251
export class NavigationMainPageRouter { }

0 commit comments

Comments
 (0)