docs(forms): FORM_BINDINGS and FORM_DIRECTIVES
This commit is contained in:
parent
6a6396963f
commit
7ae74cf91d
|
@ -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]);
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue