p.location-badge. exported from angular2/forms defined in angular2/src/forms/directives/control_group_directive.ts (line 10) :markdown Binds a control group to a DOM element. # Example In this example, we bind the control group to the form element, and we bind the login and password controls to the login and password elements. Here we use formDirectives, rather than importing each form directive individually, e.g. `ControlDirective`, `ControlGroupDirective`. This is just a shorthand for the same end result. ``` @Component({selector: "login-comp"}) @View({ directives: [formDirectives], template: "
" + "Login " + "Password " + "" + "
" }) class LoginComp { loginForm:ControlGroup; constructor() { this.loginForm = new ControlGroup({ login: new Control(""), password: new Control("") }); } onLogin() { // this.loginForm.value } } ``` .l-main-section h2 Members .l-sub-section h3 constructor pre.prettyprint code. constructor(@Ancestor() _parent: ControlContainerDirective) :markdown .l-sub-section h3 formDirective :markdown .l-sub-section h3 onDestroy pre.prettyprint code. onDestroy() :markdown .l-sub-section h3 onInit pre.prettyprint code. onInit() :markdown .l-sub-section h3 path :markdown