Javascript Code:
function InitializeVue() {
var vueOptions = {
el: '#activeEvents',
data: {
activeEvents: []
}
};
vueInstance = new Vue(vueOptions);
}
HTML Code:
<table id="activeEvents">
<tr v-for="event in activeEvents">
<td>{{event.serviceType}}</td>
<td>{{event.loc}}</td>
<td>{{event.dateLastUpdated}}</td>
<td>
<!-- Include a button here that triggers window.open() with the URL "Update.aspx?id={{event.eventID}}" -->
</td>
</tr>
</table>
I have faced difficulties as it's not possible to directly inject attributes from a Vue object into an HTML element, and I encountered issues referencing the Vue object from within a script due to it being undefined.
If you are considering downvoting, please provide feedback on why. Thank you!