📅  最后修改于: 2022-03-11 15:04:02.135000             🧑  作者: Mango
[ngModel]="name" is the syntax for one-way binding, while,
[(ngModel)]="name" is for two-way binding, and the syntax is compound from:
[ngModel]="name" and (ngModelChange)="name = $event"
//If you only need to pass model, use the first one.
//If your model needs to listen change events
//(e.g. when input field value changes),
//use the second one.