Looking to incorporate a link within a v-for loop using VUE.js, where the number of items ranges from 1 to 5. The catch is that the href attribute must be populated by a web api call to determine the URL. Below is the code snippet:
<div v-for="objGrant in obj.GrantListData" :key="objGrant.NCI_GrantList" >
<b>Grant Support:<a class="nav-link"
v-bind:href= {{load_NIH_Reporter(objGrant.GrantID)}}
target='_blank'
aria-label= 'Support' >{{ objGrant.GrantID }}</a></b>
</div>
Encountering the following error:
'v-bind' directives require an attribute value.
load_NIH_Reporter function is meant to trigger a web API call by passing an ID to retrieve the appropriate URL. Is there a more efficient approach or should the web API only be called upon clicking the link?