forked from ionic-team/ionic-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.html
More file actions
134 lines (120 loc) · 3.5 KB
/
Copy pathmain.html
File metadata and controls
134 lines (120 loc) · 3.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<ion-toolbar>
<ion-segment id="segment" [(ngModel)]="relationship" (change)="onSegmentChanged($event)">
<ion-segment-button value="friends" (select)="onSegmentSelected($event)" class="e2eSegmentFriends">
Friends
</ion-segment-button>
<ion-segment-button value="enemies" (select)="onSegmentSelected($event)">
Enemies
</ion-segment-button>
</ion-segment>
</ion-toolbar>
<ion-toolbar>
<ion-buttons end>
<button>
<ion-icon name="search"></ion-icon>
</button>
</ion-buttons>
<ion-segment [(ngModel)]="icons" secondary>
<ion-segment-button value="camera">
<ion-icon name="camera"></ion-icon>
</ion-segment-button>
<ion-segment-button value="bookmark">
<ion-icon name="bookmark"></ion-icon>
</ion-segment-button>
</ion-segment>
</ion-toolbar>
<ion-content padding>
<div>Are we friends or enemies? <b>{{ relationship }}</b></div>
<h4>Map mode: NgControl</h4>
<form (submit)="doSubmit($event)" [ngFormModel]="myForm">
<ion-segment ngControl="mapStyle" danger>
<ion-segment-button value="standard" class="e2eSegmentStandard">
Standard
</ion-segment-button>
<ion-segment-button value="hybrid">
Hybrid
</ion-segment-button>
<ion-segment-button value="sat">
Satellite
</ion-segment-button>
</ion-segment>
</form>
<p>
Map mode: <b>{{myForm.controls.mapStyle.value}}</b> -
<span [ngSwitch]="myForm.controls.mapStyle.value">
<span *ngSwitchWhen="'standard'">
<b>Standard</b>
</span>
<span *ngSwitchWhen="'hybrid'">
<b>Hybrid</b>
</span>
<span *ngSwitchWhen="'sat'">
<b>Satellite</b>
</span>
</span>
</p>
<hr>
<h4>Model style: NgModel</h4>
<ion-segment [(ngModel)]="modelStyle" dark>
<ion-segment-button value="A">
Model A
</ion-segment-button>
<ion-segment-button value="B">
Model B
</ion-segment-button>
<ion-segment-button value="C" class="e2eSegmentModelC">
Model C
</ion-segment-button>
<ion-segment-button value="D">
Model D
</ion-segment-button>
</ion-segment>
<p>Model Style: <b>Model {{ modelStyle }}</b></p>
<ion-segment [(ngModel)]="icons">
<ion-segment-button value="camera">
<ion-icon name="camera"></ion-icon>
</ion-segment-button>
<ion-segment-button value="bookmark">
<ion-icon name="bookmark"></ion-icon>
</ion-segment-button>
</ion-segment>
</ion-content>
<ion-toolbar position="bottom" primary>
<ion-segment [(ngModel)]="appType" light>
<ion-segment-button value="paid">
Primary
</ion-segment-button>
<ion-segment-button value="free">
Toolbar
</ion-segment-button>
<ion-segment-button value="top" class="e2eSegmentTopGrossing">
Default Segment
</ion-segment-button>
</ion-segment>
</ion-toolbar>
<ion-toolbar position="bottom">
<ion-segment [(ngModel)]="appType" danger>
<ion-segment-button value="paid">
Light
</ion-segment-button>
<ion-segment-button value="free">
Toolbar
</ion-segment-button>
<ion-segment-button value="top">
Danger Segment
</ion-segment-button>
</ion-segment>
</ion-toolbar>
<ion-toolbar position="bottom">
<ion-segment [(ngModel)]="appType" dark>
<ion-segment-button value="paid">
Light
</ion-segment-button>
<ion-segment-button value="free">
Toolbar
</ion-segment-button>
<ion-segment-button value="top">
Default Segment
</ion-segment-button>
</ion-segment>
</ion-toolbar>