I am currently in the process of developing a news website utilizing the NYT REST API. My goal is to dynamically add attributes to the components with the help of document.getElementsByClassName()
For instance, I would like to incorporate a title into my component (where the title is actually a prop of type String), and I aim to dynamically add it through a loop. While I have successfully added it conventionally in the provided code snippet, the challenge arises when dealing with multiple components - say 30 components - where data is stored in an array and titles need to be retrieved from that array.
<News_Card class="card" :title='this.all_data[0].title' />
My objective is to programmatically include this :title='this.all_data[0].title' through a loop