In my HTML, I have an ng-repeat loop where a variable is displayed in table rows. I want the user to be able to click on a value and pass it to a JavaScript function for further action. The code snippet below showcases my earlier version which successfully displays host values from filteredList with link attributes:
<tr data-ng-repeat="update in filteredList">
<td> <a href="#">{{update.host}}</a> </td>
<td> {{update.date}} </td>
<td> {{update.num}} </td>
</tr>
However, my attempt to pass the clicked host value to my "searcher" function using ng-click doesn't work as expected:
<tr data-ng-repeat="update in filteredList">
<td> <a href="#" ng-click="searcher({{update.host}})">{{update.host}}</a> </td>
<td> {{update.date}} </td>
<td> {{update.num}} </td>
</tr>
AngularJS throws an error when encountering this code: Error: [$parse.syntax] Syntax Error: Token 'update.host' unexpected, expecting [:] at column 12 of the expression [searcher({{update.host}});] starting at [update.host}});].
I am seeking advice on how to properly pass the clicked host value to my function in a way that AngularJS accepts.
Thank you!