-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vue 2.0+ v-for. Getting a 'Property or method is not defined on the instance but referenced during render` error #4276
Comments
You should not put Simply moving the template out of the main element solved the problem. |
Man, thanks... I spent 2 days with this and now your answer saved me. <3 |
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: