For some reason when I try and enter JavaScript into the angle part of the HTML portion it does not work. I\'m using Thymeleaf.
Here\'s the HTML portion:
Try this:
this.displayInfo()}>Click for info about {firstName[i]}
you should pass an arrow function in your onClick event