Maylin Anne Maylin Anne - 1 year ago 99
AngularJS Question

how to use AngularJS value as parameter in function?

I need to pass an ID value once the button is clicked.
but gives me this error: error message

What is the correct way of using:


<table id="Content" ng-repeat="x in images | limitTo:3">
<td class="one">
<td><img class="contImage" ng-src="{{x.image}}" ng-alt="{{}}" /></td>
<td class="textAlign">{{}} <button class="viewDetails" ng-click="passID({{}})" type="button">VIEW DETAILS</button></td>
<td class="two">{{x.size}}</td>
<td class="one">{{}}</td>

Answer Source

Just without {{}}:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download