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

424 B

@cheatsheetSection Forms @cheatsheetIndex 4 @description {@target ts}import { FormsModule } from '@angular/forms';{@endtarget} {@target js}Available from ng.forms.FormsModule{@endtarget} {@target dart}Available using platform_directives in pubspec{@endtarget}

@cheatsheetItem syntax: <input [(ngModel)]="userName">|[(ngModel)] description: Provides two-way data-binding, parsing and validation for form controls.