In attempting to use v-for to show a repeating list of assets in the model, I am able to display the html representation of the URL in the model array. I added an icon to “delete” the asset, in case the user erroneously loads the wrong asset to the record.
The v-for is displaying TWO icons. I want the icon to capture the ID of the particular v-for record, to pass that on to a namedAction to delete that particular item.
the code is as follows:
<div v-for="asset in model.Receipts" class="panel" style="width: 200px; float:left; margin-right: 17px">
<div class="panel-heading">
<img :src="asset.URL" style="margin-bottom:8px; width: 180px; height: 180px; object-fit: cover">
<i style="color: blue; margin-top:8px;" v-for="ID in asset" @click="namedAction('deleteReceipt',{asset:asset})" class="fa fa-2x fa-trash-o pointer"></i>
</div>
</div>
What did I miss?