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

364 B

@cheatsheetSection Forms @cheatsheetIndex 3 @description {@target js ts}import {FORM_DIRECTIVES} from 'angular2/angular2';{@endtarget} {@target dart}import 'package:angular2/angular2.dart';{@endtarget}

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