mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
refactor(demos): give each component section its own view
This commit is contained in:
25
demos/component-docs/forms/forms.ts
Normal file
25
demos/component-docs/forms/forms.ts
Normal file
@ -0,0 +1,25 @@
|
||||
import {FORM_DIRECTIVES, FormBuilder, Validators, Control, ControlGroup} from 'angular2/forms';
|
||||
import {IonicView} from 'ionic/ionic';
|
||||
|
||||
|
||||
@IonicView({
|
||||
templateUrl: 'forms/forms.html',
|
||||
bindings: [FormBuilder]
|
||||
})
|
||||
export class FormsPage {
|
||||
|
||||
constructor() {
|
||||
this.form = new ControlGroup({
|
||||
firstName: new Control("", Validators.required),
|
||||
lastName: new Control("", Validators.required)
|
||||
});
|
||||
}
|
||||
|
||||
processForm(event) {
|
||||
// TODO: display input in a popup
|
||||
console.log(event);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user