Angular ng-repeat pass item to function with parent data?
here is the plunkr: http://plnkr.co/edit/QuG8NcOvPKVAnfRNYwlx?p=preview
I need to dig down to the {{trade}} then pass the {{trade}} with its
parents to the open function.
or attach the parents from within the open() function so i can hand the
data off to another controller.
right now i only have the {{trade}} no parent tree.
<table ng-controller = "TickerListCtrl">
<thead>
<th>Symbol</th>
</thead>
<tbody ng-repeat="ticker in tickers">
<tr ng-click="showTrades(ticker)">
<td>{{ticker.Ticker}}</td>
</tr>
<tr ng-show="ticker.showTrades">
<td colspan="2">
<ul ng-repeat="trade in ticker.trades">
<li ng-click="open(trade)">{{trade}}</li>
</ul>
</td>
</tr>
</tbody>
</table>
No comments:
Post a Comment