您的位置:首页 > Web前端 > AngularJS

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

2017-12-20 10:12 1681 查看
ERROR Error: If ngModel is used within a form tag, either the name attribute must be set or the form
control must be defined as 'standalone' in ngModelOptions.


解决方案1:

在input标签上加上name属性


解决方案2:

在input标签上加上[ngModelOptions]="{standalone: true}"
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  angularjs2
相关文章推荐