@@ -4,129 +4,6 @@ import {NS_ROUTER_DIRECTIVES} from "nativescript-angular/router/ns-router";
44import { FirstComponentActionBar } from "./action-bar-first.component" ;
55import { 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 ] ,
0 commit comments