0👍
It looks like you’re not processing the json stored in app.variants
nor are you calling the updateAll()
method. Assuming that app.variants
does not need any further processing, then perhaps calling updateAll()
when you receive data through the ajax request would be your best solution.
- [Vuejs]-Django + Vue.js can't display images from database
- [Vuejs]-Extract the sum in JSON of a given date range?
0👍
I this case I would simply use the updateAll() method you have. something like this:
}).then(function(response) {
app.variants = response.data;
this.updateAll(app.variants[0].image, app.variants[0].description, app.variants[0].title, app.variants[0].video)
}).catch(function(error) {
but.. it’s not that clean 🙂
Source:stackexchange.com