docs(forms): FORM_BINDINGS and FORM_DIRECTIVES

This commit is contained in:
Alex Rickabaugh 2015-09-24 15:03:16 -07:00
parent 6a6396963f
commit 7ae74cf91d
2 changed files with 21 additions and 0 deletions

View File

@ -39,4 +39,13 @@ export {FormBuilder} from './forms/form_builder';
import {FormBuilder} from './forms/form_builder';
import {CONST_EXPR, Type} from './facade/lang';
/**
* Shorthand set of bindings used for building Angular forms.
*
* ### Example:
*
* ```typescript
* bootstrap(MyApp, [FORM_BINDINGS]);
* ```
*/
export const FORM_BINDINGS: Type[] = CONST_EXPR([FormBuilder]);

View File

@ -34,6 +34,18 @@ export {DefaultValidators} from './directives/validators';
* A list of all the form directives used as part of a `@View` annotation.
*
* This is a shorthand for importing them each individually.
*
* ### Example:
*
* ```typescript
* @View({
* directives: [FORM_DIRECTIVES]
* })
* @Component({
* selector: 'my-app'
* })
* class MyApp {}
* ```
*/
export const FORM_DIRECTIVES: Type[] = CONST_EXPR([
NgControlName,