mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 11:41:20 +08:00

Converted values to some sass variables, moved transition to after button tap, added border bottom for md mode, reorganized the sass variables by the order they’re used, removed the use of !important, added iOS hover background-color. Closes #283
62 lines
1.4 KiB
HTML
62 lines
1.4 KiB
HTML
<ion-toolbar>
|
|
<ion-title>
|
|
<ion-segment>
|
|
<ion-segment-button>
|
|
Friends
|
|
</ion-segment-button>
|
|
<ion-segment-button>
|
|
Enemies
|
|
</ion-segment-button>
|
|
</ion-segment>
|
|
</ion-title>
|
|
</ion-toolbar>
|
|
|
|
<ion-content padding>
|
|
<form (submit)="doSubmit($event)" [ng-form-model]="myForm">
|
|
<ion-segment ng-control="mapStyle" danger>
|
|
<ion-segment-button value="standard">
|
|
Standard
|
|
</ion-segment-button>
|
|
<ion-segment-button value="hybrid">
|
|
Hybrid
|
|
</ion-segment-button>
|
|
<ion-segment-button value="sat">
|
|
Satellite
|
|
</ion-segment-button>
|
|
</ion-segment>
|
|
<button type="submit" button primary>Submit</button>
|
|
</form>
|
|
|
|
Map mode: <b>{{myForm.controls.mapStyle.value}}</b>
|
|
|
|
<div [ng-switch]="myForm.controls.mapStyle.value">
|
|
<div *ng-switch-when="'standard'">
|
|
<h2>Standard</h2>
|
|
</div>
|
|
<div *ng-switch-when="'hybrid'">
|
|
<h2>Hybrid</h2>
|
|
</div>
|
|
<div *ng-switch-when="'sat'">
|
|
<h2>Satellite!!</h2>
|
|
</div>
|
|
</div>
|
|
|
|
<hr>
|
|
|
|
<h3>NgModel</h3>
|
|
|
|
<ion-segment [(ng-model)]="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">
|
|
Model C
|
|
</ion-segment-button>
|
|
</ion-segment>
|
|
|
|
Model Style: <b>Model {{ modelStyle }}</b>
|
|
</ion-content>
|