I am working on angularjs application. I'm iterating the response and displaying in a table, when user click on the table row information i'm passing the json value to the java script where i will process further and display information.
<tr ng-repeat="info in responseData">
<td>
{{info.id}}</td>
<td>
<a href="javascript:void(0)"
ng-click="showDetails(x.product1Data)">
product1 Data</a>
</td>
<td style="width:15%;text-align: center;">
<a href="javascript:void(0)"
ng-click="showDetails(x.product2Data)">
product2 Data </a>
</td>
<td style="width:15%;text-align: center;">
<a href="javascript:void(0)"
ng-click="showDetails(x.product3Data)">
product3 Data</a>
</td>
<td>
<a href="javascript:void(0)"
ng-click="showDetails(..)">Show All Product Data </a>
</td>
</tr>
In the above html code, when user click on Show All Product Data i want to pass x.product1Data,x.product2Data,x.product3Data value to showDetails(..). Any inputs on how to pass all 3 objects in showDetails when user click on Show All Product Data
js code:
$scope.showDetails = function(productInfo){
//productInfo contains the product information
agularjs.forEach(productInfo,function(value,key){
}
}
showDetails(x.product1Data,x.product2Data,x.product3Data)