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 >
无报错