import {FormBuilder, Validators, ControlGroup} from 'angular2/angular2'; import {IonicApp, IonicView} from 'ionic/ionic'; import {SinkPage} from '../sink-page'; @IonicView({ template: ` Form

Forms

Forms help you gather important information from the user, like login information or content to send to your server.

Ionic comes with a variety of useful from controls, like text inputs, text areas, toggle switches, and sliders.

` }) export class FormPage extends SinkPage { constructor(app: IonicApp) { super(app); var fb = new FormBuilder() this.form = fb.group({ email: ['', Validators.required], password: ['', Validators.required], }); } doSubmit(event) { console.log('Submitted:', this.form.value); event.preventDefault(); } }