For some reason i cannot get a loop working within a single file .vue file. The following error occurs:
Property or method "value" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property.
(Getting the same error for the key value)
.vue File:
<template>
<div class="grid-view container mx-auto flex items-center py-4">
<div v-bind:for="(value, key) in testdata">
{{ key }}: {{ value }}
</div>
</div>
</template>
<script>
export default {
props: [
'testdata'
]
}
</script>
HTML:
<test :testdata="{'name':'sku','name':'test'}"></test>
Hope someone can help!