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