在Angular 5中,用于输入
<input name="techSpecMeta.make" [(ngModel)]="techSpecMeta.make" type="text" class="form-control border-input" placeholder="Enter car brand">
得到错误
无法读取未定义的属性’make’
在Object.eval [作为updateDirectives]
export class UserComponent implements OnInit { constructor(private vahinfo: VehicleInfo) {} ngOnInit() {} techSpecMeta: {}; onSave = function(vehicle,isValid: boolean) { this.vahinfo.saveVehicle(vehicle).subscribe(data => { console.log(data.data) },error => this.errorMessage = error) } }