angular-cn/modules/@angular/docs/cheatsheet/forms.md

14 lines
432 B
Markdown
Raw Normal View History

2015-11-05 10:04:55 -05:00
@cheatsheetSection
2015-11-06 07:26:24 -05:00
Forms
@cheatsheetIndex 3
2015-11-05 10:04:55 -05:00
@description
{@target ts}`import {FORM_DIRECTIVES} from '@angular/common';`{@endtarget}
{@target js}Available from `ng.common.FORM_DIRECTIVES`{@endtarget}
{@target dart}Available using `platform_directives` in pubspec{@endtarget}
2015-11-05 10:04:55 -05:00
@cheatsheetItem
syntax:
`<input [(ngModel)]="userName">`|`[(ngModel)]`
description:
Provides two-way data-binding, parsing and validation for form controls.