My table resembles a tree structure with two ng-repeats.
<table>
<tr ng-repeat-start="am in anArray">
<td><button ng-click="TheFunction(am)"></button></td>
</tr>
<tr ng-repeat-start="em in anotherArray">
<td><button ng-click="TheFunction2(em)"></button></td>
</tr>
<tr ng-repeat-end></tr>
<tr ng-repeat-end></tr>
By applying some functions to toggle the "correct" line, a tree-like structure is displayed on the screen where each row contains a button that triggers a function defined within the scope. In the controller, I have implemented the following functions:
$scope.TheFunction=function(am){
alert(am); //and other operations involving the am object
}
$scope.TheFunction2=function(em){
alert(em); //and other operations involving the em object
}
Despite the working functionality of the tree-like construct on the webpage and the proper execution of the respective functions upon button clicks, the passed parameters appear to be undefined when checked.
Could there be something that I overlooked?