I have been struggling with this for way too long now. Vue throws an error that name is not defined. It is not defined from start but ajaxed in when Vue is created.
clients.php
<input type="text" v-bind:value="customers[<? echo $this->client['id'];?>].name">
App data
var app = new Vue({
el: '#app',
data: {
customers: {},
}
})
app.js
created: function(){
// fetches clients via AJAX and places them in customer object
this.get_clients()
}
console error: TypeError: Cannot read property 'name' of undefined