Angular2 If ngModel is used within a form tag, either the name attribute must be set or the form

前端 未结 14 2311
借酒劲吻你
借酒劲吻你 2020-12-04 07:33

I am getting this error from Angular 2

core.umd.js:5995 EXCEPTION: Uncaught (in promise): Error: Error in app/model_exposure_currencies/model_exposure_cu

14条回答
  •  没有蜡笔的小新
    2020-12-04 08:15

    You didn't mention the version you're using, but if you're using rc5 or rc6, that "old" style of form has been deprecated. Take a look at this for guidance on the "new" forms techniques: https://angular.io/docs/ts/latest/guide/forms.html

提交回复
热议问题