You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting a 'Property or method is not defined` error:
[Vue warn]: Property or method "genre" is not defined on the instance but referenced during render. Make sure to declare reactive data properties in the data option.
(found in root instance)
[Vue warn]: Error when rendering root instance
TypeError: Cannot read property 'key' of undefined(…)
While using a v-for="(genre, $index) in formFieldData.options":
The text was updated successfully, but these errors were encountered:
netpoe
changed the title
Vue 2.0+ getting
Vue 2.0+ a 'Property or method is not defined on the instance but referenced during render` error
Nov 22, 2016
netpoe
changed the title
Vue 2.0+ a 'Property or method is not defined on the instance but referenced during render` error
Vue 2.0+ getting a 'Property or method is not defined on the instance but referenced during render` error
Nov 22, 2016
netpoe
changed the title
Vue 2.0+ getting a 'Property or method is not defined on the instance but referenced during render` error
Vue 2.0+ v-for. Getting a 'Property or method is not defined on the instance but referenced during render` error
Nov 22, 2016
You should not put script/x-template tages inside of the element that you mount to the main instance to. Vue 2.0 will read all of its content and try to use it as a template for the main instance, and Vue's virtualDOM treats script/x-template's like normal DOM, which screws everthing up,
Simply moving the template out of the main element solved the problem.
I'm getting a 'Property or method is not defined` error:
While using a
v-for="(genre, $index) in formFieldData.options"
:The thing is that I used to have this kind of code in VueJS <2.0 and it worked, except for the
(genre, $index) in ...
of course.How can I solve this? I need the formFieldData to be part of the component as it does not belong to the parent/root instance.
FYI
If I do only:
The browser displays:
But it's not getting the property on
{{ genre.key }}
Here's a jsFiddle, check the console.logs to look at the error.
Chrome DevTools VUE Tab shows the
<Root>
instance with a child<MusicGenreId>
component and the component actually displays the data:The text was updated successfully, but these errors were encountered: