我创建了一个角度应用程序,用于根据 ascii 值对 html 表进行排序。该应用程序运行良好,但问题是当我将分隔符从“ng:”更改为“ng-”时,排序不起作用。如果这是由于其他原因造成的,请原谅我......因为我是 Angular js 的新手
谁能告诉我一些解决方案
带有“ng-”分隔符的角码(工作演示) - 排序不工作
<div ng-controller="Main" ng-app="myApp">
<table border="1">
<tr>
<th><a href ng-click="sortBy('name')">Name</a></th>
<th><a href ng-click="sortBy('phone')">Phone Number</a></th>
<th><a href ng-click="sortBy('age')">Age</a></th>
<th><a href ng-click="sortBy('date')">Date</a></th>
</tr>
<tr ng-repeat="friend in friends|orderBy:sort:reverse">
<td>{{friend.name}}</td>
<td>{{friend.phone}}</td>
<td>{{friend.age}}</td>
<td>{{friend.date}}</td>
</tr>
</table>
</div>