p.location-badge. exported from angular2/forms defined in angular2/src/forms/directives/ng_form.ts (line 19) :markdown Creates and binds a form object to a DOM element. # Example ``` @Component({selector: "signup-comp"}) @View({ directives: [FORM_DIRECTIVES], template: `
`}) class SignupComp { onSignUp(value) { // value === {personal: {name: 'some name'}, // credentials: {login: 'some login', password: 'some password'}} } } ``` .l-main-section h2 Annotations .l-sub-section h3.annotation Directive pre.prettyprint code. @Directive({ selector: 'form:not([ng-no-form]):not([ng-form-model]),ng-form,[ng-form]', bindings: [formDirectiveBinding], host: { '(submit)': 'onSubmit()', }, events: ['ngSubmit'], exportAs: 'form' }) .l-main-section h2 Members .l-sub-section h3 constructor pre.prettyprint code. constructor() :markdown .l-sub-section h3 form :markdown .l-sub-section h3 ngSubmit :markdown .l-sub-section h3 formDirective :markdown .l-sub-section h3 control :markdown .l-sub-section h3 path :markdown .l-sub-section h3 controls :markdown .l-sub-section h3 addControl pre.prettyprint code. addControl(dir: NgControl) :markdown .l-sub-section h3 getControl pre.prettyprint code. getControl(dir: NgControl) :markdown .l-sub-section h3 removeControl pre.prettyprint code. removeControl(dir: NgControl) :markdown .l-sub-section h3 addControlGroup pre.prettyprint code. addControlGroup(dir: NgControlGroup) :markdown .l-sub-section h3 removeControlGroup pre.prettyprint code. removeControlGroup(dir: NgControlGroup) :markdown .l-sub-section h3 getControlGroup pre.prettyprint code. getControlGroup(dir: NgControlGroup) :markdown .l-sub-section h3 updateModel pre.prettyprint code. updateModel(dir: NgControl, value: any) :markdown .l-sub-section h3 onSubmit pre.prettyprint code. onSubmit() :markdown