In vuejs you can do list rendering in the template like

<td v-for="item in items"></td>......

But can you iterate over that same data array property like....

for(var i = 0; i < this.items.length; i++)
 this.$data.items[i]
share|improve this question
    
Unclear what you are asking. If items is an array, of course, you can iterate over it, but this.$data.items[i] should be this.items[i]. – Gerard Reches Nov 29 at 11:17
    
Please add more details, on what are you trying to do, what error you are getting. – saurabh Nov 29 at 13:35

yes

Just don't worry about the this.$data.items, instead this.items, although it would also work ...

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.