mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
31 lines
869 B
HTML
31 lines
869 B
HTML
<ion-content class="padding">
|
|
<form (submit)="doSubmit($event)" [ng-form-model]="myForm">
|
|
<ion-segment ng-control="mapStyle">
|
|
<ion-segment-button value="standard" button>
|
|
Standard
|
|
</ion-segment-button>
|
|
<ion-segment-button value="hybrid" button>
|
|
Hybrid
|
|
</ion-segment-button>
|
|
<ion-segment-button value="sat" button>
|
|
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>
|
|
</ion-content>
|