是否可以执行以下操作:
<li><a ng-click="letterFilter = {section:'{{bound.value}}'}">{{bound.value}}</a></li>
使用ng-repeat和JSON文件通过$ http
提供以下输出 <li><a ng-click="letterFilter = {section:'A'}">A</a></li>
<li><a ng-click="letterFilter = {section:'B'}">B</a></li>
由于
其他信息: JSON
[{"section": "A"},{"section": "B"},{"section": "C"}]
HTML
<ul ng-controller="letterController" class="pagination">
<li ng-repeat="letter in letters"><a ng-click="letterFilter = {section: letter.section}">{{letter.section}}</a></li>
</ul>
app.js
.controller('letterController',['$scope','$http',function($scope,$http){
$http.get('data.json').success(function(data){
$scope.letters= data;
})
}])