MySQL的我格式化得当:
saveEntry() {
let name: string = this.form.controls["name"].value,
country: string = this.form.controls["country"].value,
state: string = this.form.controls["state"].value,
city: string = this.form.controls["city"].value,
experience: string = this.form.controls["experience"].value
console.log("save Entry :"+ name, country, state, city, experience)
this.createEntry(name, country, state, city, experience);
}
难道改成这样:
saveEntry() {
let name: string = this.form.controls["name"].value;
let country: string = this.form.controls["country"].value;
let state: string = this.form.controls["state"].value;
let city: string = this.form.controls["city"].value;
let experience: string = this.form.controls["experience"].value;
console.log("save Entry :"+ name, country, state, city, experience);
this.createEntry(name, country, state, city, experience);
}
请使用;
每个命令后。
什么是您的控制台日志显示? createEntry()
是做什么的?
saveEntry(){ 令名:字符串= this.form.controls [ “名称”]值, 国家:字符串= this.form.controls [ “国家”]值, 状态:字符串=此.form.controls [“state”]。value, city:string = this.form.controls [“city”]。value, experience:string = this.form.controls [“experience”]。value console .log(“保存条目:”+名称,国家,州,市,经验) this.createEntry(姓名,国家,州,市,经验); } –
它没有选择清单的价值。只显示“对象”... –
把你的代码放在上面的问题中? – Sampath