Currently, my Vue application relies on Esri's Mapping API for functionality.
One feature provided by the Esri API allows me to define a popup template content using an object:
const popupWindowTemplate = {
title: "{mag} magnitude near {place}",
content: getContent
};
and a function
getContent: function(){
let node = document.createElement('div');
node.innerHTML = "<button type='button'>Do my thing!</button>"
return node;
}
However, I am looking to enhance this setup by making the getTemplate function return a Vue component rendered within the innerHTML instead of static HTML code.
I have created a Vue component:
const buffer = Vue.component('do-mything', {
template: '<div><button type="button" @click="domything">Do my thing!</button></div>',
data() {
return {
somevalue: ''
};
}
});
I believe that this approach involves utilizing components render functions, but I have encountered difficulties in embedding the component within the getContent function.