'v-for not displaying the object rendered with ejs template
Here's the code for displaying the content of logs by v-for:
<tr v-for="log in logs" :key="log.id">
<td>{{log.name}}</td>
<td>{{log.establishment}}</td>
<td>{{log.address}}</td>
<td>{{log.date}}</td>
</tr>
On mounted(), I'm initializing the content of logs and I'm sure that it contains the data since it is displaying using console.log.
mounted() {
this.logs = '<%- JSON.stringify(logs) %>';
console.log(this.logs);
}
However, it is not displaying the content using v-for. Is there another way to store ejs rendered object to vue data()?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
