BREAKING CHANGE: Angular is now fully camel case. Before: <p *ng-if="cond"> <my-cmp [my-prop]="exp"> <my-cmp (my-event)="action()"> <my-cmp [(my-prop)]="prop"> <input #my-input> <template ng-for #my-item [ng-for-of]=items #my-index="index"> After <p *ngIf="cond"> <my-cmp [myProp]="exp"> <my-cmp (myEvent)="action()"> <my-cmp [(myProp)]="prop"> <input #myInput>`, <template ngFor="#my-item" [ngForOf]=items #myIndex="index"> The full details are found in [angular2/docs/migration/kebab-case.md](https://github.com/angular/angular/blob/master/modules/angular2/docs/migration/kebab-case.md)
13 lines
364 B
Markdown
13 lines
364 B
Markdown
@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.
|