错误angular2 Error: If ngModel is used within a form tag...
来源:互联网 发布:lumia800下载软件 编辑:程序博客网 时间:2024/05/01 00:45
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.
Example 1: <input [(ngModel)]="person.firstName" name="first"> Example 2: <input [(ngModel)]="person.firstName" [ngModelOptions]="{standalone: true}">
input 标签没有 name
添加上name=”xxxName”
<input placeholder="phone" [(ngModel)]="person.phone" #personPhone = "ngModel" maxlength="11" required >
修改后
<input placeholder="phone" [(ngModel)]="person.phone" #personPhone = "ngModel" maxlength="11" name="phone" required >
无报错
阅读全文
0 0
- 错误angular2 Error: If ngModel is used within a form tag...
- ERROR Error: If ngModel is used within a form tag, either the name attribute must be set or the form
- angular2中standalone=“true”和Name attribute must be set if ngModel is used within a form的问题
- When is a CDATA section necessary within a script tag?
- Angular2 gotchas: Double binding within Form
- 错误:is quoted with " which must be escaped when used within the value
- 错误:is quoted with " which must be escaped when used within the value .
- 错误:is quoted with " which must be escaped when used within the value (转载)
- 页面500错误is quoted with " which must be escaped when used within the value
- 错误:is quoted with " which must be escaped when used within the value
- Actionscript Error: declaration must be contained within the <Declarations> tag, since it is not ass
- Checking if a user is a member in a SharePoint group within web InfoPath 2010 forms
- end tag "</html:form" is unbalanced 错误分析
- 使用angular2的[(ngModel)]
- Resolving a 'sticky tag is not a branch' error
- Check if a port is being used on a Windows machine
- 编译qt4.8.1时出现错误 error: 'union' tag used in naming 'struct _GMutex'
- Error parsing reference: "Pxxxxxx" is not a valid repository/tag
- java学习日记
- springMVC框架一之的登录功能的介绍
- Android控件RecyclerView的基本用法
- __declspec关键字详细用法
- Windows程序设计-文本输出
- 错误angular2 Error: If ngModel is used within a form tag...
- 【NOIP2016复赛模拟赛2】侦察兵
- 第一节,java网络编程学习的概念
- ASP报错总结
- Oracle dump索引组织表
- 英语阅读记录一
- 洛谷 P1189 SEARCH
- NSOJ D的小L
- PID调节经验