mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 04:14:21 +08:00
fix(segment): working
This commit is contained in:
@ -5,12 +5,11 @@ import {App} from 'ionic/ionic';
|
||||
|
||||
@App({
|
||||
templateUrl: 'main.html',
|
||||
appInjector: [FormBuilder],
|
||||
bindings: [FormBuilder],
|
||||
directives: [FORM_DIRECTIVES]
|
||||
})
|
||||
class IonicApp {
|
||||
class MyApp {
|
||||
constructor(fb: FormBuilder) {
|
||||
|
||||
this.myForm = fb.group({
|
||||
mapStyle: ['hybrid', Validators.required]
|
||||
});
|
||||
@ -18,7 +17,7 @@ class IonicApp {
|
||||
}
|
||||
|
||||
doSubmit(event) {
|
||||
console.log('Submitting form', this.form.value);
|
||||
console.log('Submitting form', this.myForm.value);
|
||||
event.preventDefault();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user