Angular2双向数据绑定

双向数据绑定

看看Name的<input>标签,你会看到[(ngModel)]="model.name"的用法。

[()]表示:这里使用了双向绑定。

[]表示:数据从Model流向View

()表示:数据从View流向Model