Files
Adam Bradley f1a61cb4d5 test updates
2015-06-19 15:57:35 -05:00

32 lines
860 B
JavaScript

import {NgSwitch, NgSwitchWhen} from 'angular2/angular2'
import {Component, Directive} from 'angular2/src/core/annotations_impl/annotations';
import {View} from 'angular2/src/core/annotations_impl/view';
import {Segment, SegmentButton, Content} from 'ionic/ionic';
import {FormBuilder, Validators, formDirectives, ControlGroup} from 'angular2/forms';
@Component({ selector: 'ion-view' })
@View({
templateUrl: 'main.html',
directives: [formDirectives].concat([Segment, SegmentButton, Content, NgSwitch, NgSwitchWhen])
})
class IonicApp {
constructor() {
var fb = new FormBuilder();
this.form = fb.group({
mapStyle: ['hybrid', Validators.required]
});
}
doSubmit(event) {
console.log('Submitting form', this.form.value);
event.preventDefault();
}
}
export function main(ionicBootstrap) {
ionicBootstrap(IonicApp);
}