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

432 B

@cheatsheetSection Forms @cheatsheetIndex 3 @description {@target ts}import {FORM_DIRECTIVES} from 'angular2/common';{@endtarget} {@target js}Available from ng.common.FORM_DIRECTIVES{@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.