I am a novice in vuejs and I am attempting to utilize mustache {{}} to render elements of an array. It works fine for simple arrays, but when I try it with an array containing objects, it doesn't seem to work.
Is there an issue with my code, or is it simply not possible and I need to use another method that I am not familiar with?
var app = new Vue({
el: '#app',
data: {
object1: {
type: "ball",
color: "red",
number: 1
},
object2: {
type: "house",
color: "blue",
number: 2
},
items: [object1, "hello", "world", object2]
}
})
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Montserrat&display=swap');
@import url('https://db.onlinewebfonts.com/c/20af36ba0a52c9a46fe2963f400bd77c?family=Dystopian+Black');
body {
margin: 0;
background-color: #1b1c21;
font-family: Mont;
user-select: none;
}
...
...
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.js"></script>
<!DOCTYPE html>
<html lang="fr">
...
...
...