I have a list service that creates html to a html component using an array of objects that I have content set to each one as div element. I use a list service to set database Ids to each content. How can I set a click event to each div so I can save the database id of the div that was clicked on and navigate to another page.
Example how my service and html is set
<!--
temp=[];
for(Loop){
/* I am trying to add click event for each div, that will save that id to storage and navigate to another page when clicked*/
temp.push({
content: "<div id='label'<p data.nameOfSomething</p<",
id: data.id
});
}
/* More Code */
--