Wednesday, August 15, 2018

Other names for the banana box syntax of two way data binding in Angular include banana brackets and box of bananas.

You are supposed to visualize that the parenthesizes are inside the square brackets so that you do not put them on the outside. The names and their intent are explained on page 133 of "ASP.NET Core 2 and Angular 5" by Valerio De Sanctis which also mentions that you may replace [(ngModel)]="something.er.other" with [ngModel]="something.er.other" to merely hand a property into a control (input, textarea, etc.) in lieu of doing two way data binding. Cool stuff.

No comments:

Post a Comment