mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
Shieeet
This commit is contained in:
@@ -1,29 +1,32 @@
|
||||
<ion-content class="padding">
|
||||
<form (^submit)="doSubmit($event)" [control-group]="form">
|
||||
|
||||
<ion-segment>
|
||||
<ion-segment-button value="standard" ion-button>
|
||||
Standard
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="hybrid" ion-button>
|
||||
Hybrid
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="sat" ion-button>
|
||||
Satellite
|
||||
</ion-segment-button>
|
||||
<!--
|
||||
<button ion-button class="active" [segment-value]="standard">
|
||||
Standard
|
||||
</button>
|
||||
<ion-segment control="mapStyle">
|
||||
<ion-segment-button value="standard" ion-button>
|
||||
Standard
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="hybrid" ion-button>
|
||||
Hybrid
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="sat" ion-button>
|
||||
Satellite
|
||||
</ion-segment-button>
|
||||
<!--
|
||||
<button ion-button class="active" [segment-value]="standard">
|
||||
Standard
|
||||
</button>
|
||||
|
||||
<button ion-button [segment-value]="hybrid">
|
||||
Hybrid
|
||||
</button>
|
||||
<button ion-button [segment-value]="hybrid">
|
||||
Hybrid
|
||||
</button>
|
||||
|
||||
<button #sat ion-button [segment-value]="sat">
|
||||
Satellite
|
||||
</button>
|
||||
-->
|
||||
<button #sat ion-button [segment-value]="sat">
|
||||
Satellite
|
||||
</button>
|
||||
-->
|
||||
|
||||
</ion-segment>
|
||||
</ion-segment>
|
||||
<button type="submit" button primary>Submit</button>
|
||||
</form>
|
||||
|
||||
</ion-content>
|
||||
|
||||
@@ -9,6 +9,16 @@ import {IONIC_DIRECTIVES} from 'ionic/ionic'
|
||||
})
|
||||
class IonicApp {
|
||||
constructor() {
|
||||
|
||||
var fb = new FormBuilder();
|
||||
this.form = fb.group({
|
||||
mapStyle: ['', Validators.required]
|
||||
});
|
||||
}
|
||||
|
||||
doSubmit(event) {
|
||||
console.log('Submitting form', this.form.value);
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user