I know its not related to any coding but they can follow the same syntax as in Angular 1
<input ng-model="hero.name" placeholder="name" type="text">
AngulAR 2 or its Greater Version Syntax till now
<input [(ngModel)]="hero.name" placeholder="name" type="text">
If they do so, it would be very helpful for people to adapt change in Angular JS ?
Similarly for ng-repeat, they changed to ngFor
<ul ngFor let-item [ngForOf]="items" let-i="index" [ngForTrackBy]="trackByFn">
<li>...</li>
</ul>
<ul ng-repeat="item in items track by myTrackingFunction(n)">
<li>...</li>
</ul>
Aucun commentaire:
Enregistrer un commentaire