angular-cn/docs/content/cheatsheet/forms.md

13 lines
362 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 4
2015-11-05 10:04:55 -05:00
@description
2016-08-08 20:25:42 -04:00
{@target ts}`import { FormsModule } from '@angular/forms';`{@endtarget}
{@target js}Available using the `ng.forms.FormsModule` module{@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.