|
1 | 1 | <ActionBar title="My App" class="action-bar">
|
2 | 2 | </ActionBar>
|
3 |
| -<StackLayout class="page"> |
4 |
| - <StackLayout orientation="horizontal" class="p-10"> |
5 |
| - <CheckBox #modelCheck [(ngModel)]="checkTest" class="checkbox"></CheckBox> |
6 |
| - <Label text="Test NgModel" (tap)="modelCheck.toggle()"></Label> |
| 3 | + |
| 4 | +<TabView> |
| 5 | + |
| 6 | + <!-- Tab1: Checkboxes --> |
| 7 | + <StackLayout *tabItem="{title: 'Checkboxes'}"> |
| 8 | + <StackLayout class="page"> |
| 9 | + <StackLayout orientation="horizontal" class="p-10"> |
| 10 | + <CheckBox #modelCheck [(ngModel)]="checkTest" class="checkbox"></CheckBox> |
| 11 | + <Label text="Test NgModel" (tap)="modelCheck.toggle()"></Label> |
| 12 | + </StackLayout> |
| 13 | + <StackLayout class="form-group" [formGroup]="formGroup" orientation="horizontal" class="p-10"> |
| 14 | + <CheckBox #reactiveCheck class="checkbox" formControlName="testCheck" class="checkbox"></CheckBox> |
| 15 | + <Label text="Test Reactive FormGroup" (tap)="reactiveCheck.toggle()"></Label> |
| 16 | + </StackLayout> |
| 17 | + |
| 18 | + <StackLayout class="p-10"> |
| 19 | + <Button text="Submit Values" (tap)="submit()" class="btn btn-primary"></Button> |
| 20 | + </StackLayout> |
| 21 | + |
| 22 | + <ListView [items]="items" class="list-group"> |
| 23 | + <ng-template let-item="item"> |
| 24 | + <Label [nsRouterLink]="['/item', item.id]" [text]="item.name" |
| 25 | + class="list-group-item"></Label> |
| 26 | + </ng-template> |
| 27 | + </ListView> |
| 28 | + </StackLayout> |
7 | 29 | </StackLayout>
|
8 |
| - <StackLayout class="form-group" [formGroup]="formGroup" orientation="horizontal" class="p-10"> |
9 |
| - <CheckBox #reactiveCheck class="checkbox" formControlName="testCheck" class="checkbox"></CheckBox> |
10 |
| - <Label text="Test Reactive FormGroup" (tap)="reactiveCheck.toggle()"></Label> |
11 |
| - |
| 30 | + |
| 31 | + <!-- Tab2: Radiobuttons --> |
| 32 | + <StackLayout *tabItem="{title: 'Radiobuttons'}"> |
| 33 | + <Label class="p-10" text="Tap either the buttons or the labels. You can even unselect the radiobutton selection." textWrap="true"></Label> |
| 34 | + <StackLayout class="p-10" *ngFor="let option of radioOptions"> |
| 35 | + <StackLayout orientation="horizontal" verticalAlignment="center"> |
| 36 | + <CheckBox #elem [checked]="option.selected" (checkedChange)="elem.checked !== option.selected && changeCheckedRadio(option)" class="checkbox"></CheckBox> |
| 37 | + <StackLayout verticalAlignment="center"> |
| 38 | + <Label [text]="option.text" textWrap="true" (tap)="changeCheckedRadio(option)"></Label> |
| 39 | + </StackLayout> |
| 40 | + </StackLayout> |
| 41 | + </StackLayout> |
12 | 42 | </StackLayout>
|
13 |
| - <StackLayout class="p-10"> |
14 |
| - <Button text="Submit Values" (tap)="submit()" class="btn btn-primary"></Button> |
15 |
| - </StackLayout> |
16 |
| - <ListView [items]="items" class="list-group"> |
17 |
| - <ng-template let-item="item"> |
18 |
| - <Label [nsRouterLink]="['/item', item.id]" [text]="item.name" |
19 |
| - class="list-group-item"></Label> |
20 |
| - </ng-template> |
21 |
| - </ListView> |
22 |
| -</StackLayout> |
| 43 | + |
| 44 | +</TabView> |
0 commit comments