📌  相关文章
📜  ngmodel vs (ngmodel) - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:02.135000             🧑  作者: Mango

代码示例1
[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.