1

I have a table populated with data from an API based on a user input.

I then display the results as follows:

<tr ng-repeat="show in data.popularMatches">
    <td><a href="#" ng-click="selectShow('{{show.id}}')">{{show.title}}</a></td>
    <td>{{show.title_description}}</td>
</tr>

What I am trying to achieve, is to pass the ID of each show to the selectShow function in my Angular controller when each show's link is clicked. How can I do this?

1 Answer 1

5

You should only need to have ng-click="selectShow(show.id)"

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.