Hello, I'm a newcomer to using Vue.js and am encountering an issue with executing a simple for loop in my code. Any assistance or guidance would be greatly appreciated. Here is the snippet of my code:
var Vue = require('vue');
Vue.use(require('vue-resource'));
Vue.http.headers.common['X-CSRF-TOKEN'] = document.querySelector('#token').getAttribute('value');
new Vue({
el: '#adresponse',
ready: function() {
this.fetchMessages();
},
data: {
classified_bids: {},
accept_qty: {},
submitted: false
},
methods: {
fetchMessages: function () {
this.$http.get('/api/getbids')
.success(function (bids) {
this.classified_bids = bids;
for (i = 0; i < this.classified_bids.length; i++) {
this.accept_qty[i] = 0;
}
});
}
}
});