Hai我有一个地址字段,其中在添加弹出字段中我希望当我打开新弹出窗口时地址字段为空但现在它预填充了先前输入的地址,并且在编辑字段中我想要该特定地址行可编辑但现在是空的。
HTML:
添加PopUP:
<button (click)="add()"> </button>
地址栏:
<ng4geo-autocomplete [userSettings]="settings" (componentCallback)="autoCompleteCallback2($event)"></ng4geo-autocomplete>
编辑字段:
<button (click)="edit(page)"></button>
TS:
add() {
this.new_page = new NewPage();
this.addPage.show();
}
edit(page) {
this.editPage.show();
this.edit_page = page;
}
autoCompleteCallback2(selectedData:any) {
this.address=selectedData.data.formatted_address;
this.location=selectedData.data.geometry.location;
}