0👍
change this.$root.items
to $root.items
- [Vuejs]-VueJS messing up my form submit, removing all post data
- [Vuejs]-Vuejs: Use stored data withing nuxt pages
0👍
You don’t have to prefix with this.
when you’re inside the template of your component.
So, you just have to replace this.$root.items
by $root.items
and this.$root.string
by $root.string
.
However, you need to prefix with this.
if you’re referencing the value inside your Vue
object.
Example :
computed: {
exampleComputed: function () {
return this.string;
}
}
And the corrected JSFiddle : http://jsfiddle.net/89kgnrvf/19/
Source:stackexchange.com