Skip to content Skip to sidebar Skip to footer

How I Pass An Object As A Parameter In A Ng-click Within A Ng-repeat? Angularjs

How I pass an object as a parameter in a ng-click within a ng-repeat? Example: {{ table.name }}{

Solution 1:

In your component.html edit your code as shown below :

<td><button (click)=updateTable(table)>Update</button></td></tr>

then in your typescript code just declare the function

updateTable(table){
  console.log(table); //write your own code here!.
}

Post a Comment for "How I Pass An Object As A Parameter In A Ng-click Within A Ng-repeat? Angularjs"