O'Reilly logo
  • hao wang thinks this is interesting:

There is an important piece of advice regarding the use of this directive. We must pay attention to the purpose of the field that is using the ngModel directive. Every time the field is a part of the construction of an object, we must declare the object in which the property should be attached. In this case, the object that is being constructed is a car; so, we will use car.plate inside the directive expression.


Cover of AngularJS Essentials


ngModel 指令的使用要注意的