vue router's router-link in google maps infowindow

Viewed 1350

I've got this working fine, except that I've would like instead of <a> tag to use <router-link> tag because of <a> tag unlike <router-link> (which intercepts click event and don't reload the page) reloads a page.

const contentString = `
    <div class="popup">
        <a href="/places/${place._id}">
            <img src="..." />
            <h5>${place.name}</h5>
            <p>${place.gmap.address}</p>
        </a>
    </div>`

const infoWindow = new google.maps.InfoWindow()
infoWindow.setContent(contentString)

If I replace <a> tag for <router-link> it doesn't render to <a> tag as it would if that <router-link> was in vuejs template.

1 Answers
Related