I am using vue to prototype some html components. Is there a way to get vue to recognize two json files?
vue.js
var vm = new Vue({
el: '#douglas-laing',
data: {
products: [],
contentPanels: []
},
created() {
axios
.get( `products.json`, `contentPanel.json`)
.then(response => {
// JSON responses are automatically parsed.
this.products = response.data;
this.contentPanels = response.data;
})
},
computed: {
}, // end computed
methods: { }
});
in the html
<template v-for="contentPanel in contentPanels">
{{ contentPanel.description }}
</template>
in the json file
[
{
"description": "this is a content panel test",
}
]