Я хочу сделать объект и связать его с файлом html в машинописном тексте. Этот код имеет формат javascript, так что я должен сделать, чтобы создать объект и связать его в файле html.
<map>
<div>
<div #map style="position:relative;width:100%;min-width:290px;height:600px;"></div>
</div>
<div>
<button (click)="searchAddress()">Search</button>
</div>
</map>
showPopup(e): void {
//Get the properties and coordinates of the first shape that the event occurred on.
var p = e.shapes[0].getProperties();
var position = e.shapes[0].getCoordinates();
//Create HTML from properties of the selected result.
var html = `
<div style="padding:5px">
<div><b>${p.poi.name}</b></div>
<div>${p.address.freeformAddress}</div>
<div>${position[1]}, ${position[0]}</div>
</div>`;
//Update the content and position of the popup.
this.popup.setPopupOptions({
content: html,
position: position
});.