I can't figure out how to attach a dinamically created component to a DOM element created by an external JS library.
This is the code inside my root component:
markers.push(
L.marker(
[mapEvent.lng, mapEvent.lat],
{
icon: L.icon({
iconUrl: mapEvent.iconURL,
iconSize: [22, 22],
iconAnchor: [11, 11] // point of the icon which will correspond to marker's location
})
}
).bindPopup(
L.popup(
{
closeButton: true
}
).setContent(
'<template #popupHost></template>'
)
)
);
Essentially, this code is creating some elements inside the DOM that are not handled by me, and I want to use the setContent method to put my own code. What i would like to do is to inject a component inside this dynamically.
How can I solve this?
Thanks