@H_404_0@在前面的文章中学习filter过滤器,现在在结合着看看ng-repeat指令,举个例子。
<div class="jb51code">
<pre class="brush:xhtml;">
<div ng-controller="Aaa">
<table border="1">
<tr>
<th ng-click="fnSort('name')">颜色
<th ng-click="fnSort('age')">值
</tr>
<tr ng-repeat="data in dataList">
<td>{{data.name}}</td>
<td>{{data.age}}</td>
</tr>
</table>