[Vuejs]-How could I bind the ajax data with Vue

0👍

First, this is only going to ever iterate once before returning, provided PoetryList.length >= 1

// returns return PoetryList[0].id everytime
for(var i=0;i<PoetryList.length;i++){
    return PoetryList[i].id
}

Why can’t you just access item.id directly here?

<div class="inline_content" :id="item.id">

And the same for PoetryLink?

<div>{{ item.letterForth }} <a :href="item.link">click me</a> </div>

Leave a comment