I try to write some project, using Vue. When I try to add new item to array in 'data' (which should start re-render), I get this error message:
TypeError: Cannot read property '_wrapper' of undefined.
What does that mean?
[...some layout...]
<a @click="addElement" id="addBtn">Add</a>
</span>
</div>
</template>
<script>
export default {
props: [
'routes'
],
data: function () {
routes: this.props.routes
},
methods: {
addElement: function () {
this.routes.push( {[...some object...]} );
}
}
}
</script>