I have an HTML table with some data that is coming from a web service and I'm using Angular, then I have 3 radio buttons to display the top 10, 20 and 30 records from my data source. The 3 buttons should call a web service for each one, the web services are already working but I don't know how to make those radio buttons to display the new data in the table, the structure of that table doesn't change and because I'm using Angular I can avoid refreshing the whole page.
Does any one have an example for this?
My table is in a differente div with its own controller that displays some data:
<div ng-controller="ctrlOne">
<table>
<tr ng-repeat="d in data">
<td>{{d.field1}}</td>
</tr>
</table>
</div>
In another div I have my radio buttons:
<div class="radio">
<label class="radio-inline"><input type="radio" name="top30">TY Top 30 Categories</label>
<label class="radio-inline"><input type="radio" name="top20">TY Top 20 Brands</label>
<label class="radio-inline"><input type="radio" name="top10">TY Top 10 Suppliers</label>
</div>
No controller yet.