diff --git a/modules/angular2/src/core/forms.ts b/modules/angular2/src/core/forms.ts index c91f5beae4..576e96cd46 100644 --- a/modules/angular2/src/core/forms.ts +++ b/modules/angular2/src/core/forms.ts @@ -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]); diff --git a/modules/angular2/src/core/forms/directives.ts b/modules/angular2/src/core/forms/directives.ts index 9af6341461..72ed589f2e 100644 --- a/modules/angular2/src/core/forms/directives.ts +++ b/modules/angular2/src/core/forms/directives.ts @@ -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,