通过seenimurugan给出的原始答案将是here和我已经更新了他的小提琴,使其动态。 工作example
<div class="section" ng-app="phonecatApp" ng-controller="PhoneListCtrl">
<div class="slide">
<div class="container">
<h2 class="section-title">Selected Mobiles</h2>
</div>
<div class="container-fluid fix ver2">
<div class="col-md-3 work-thumb" ng-repeat="phone in phones">
{{setCount($index)}}
<a href="#">{{phone.name}}</a>
</div>
</div>
</div>
<p>Count: {{count}}</p>
</div>
@Contrller
var phonecatApp = angular.module('phonecatApp', []);
phonecatApp.controller('PhoneListCtrl', function($scope) {
$scope.count = 0;
$scope.phones = [{
'name': 'Nexus S',
'snippet': 'Fast just got faster with Nexus S.'
},
{
'name': 'Motorola XOOM™ with Wi-Fi',
'snippet': 'The Next, Next Generation tablet.'
},
{
'name': 'MOTOROLA XOOM™',
'snippet': 'The Next, Next Generation tablet.'
}
];
});
我用从seenimurugan在原来的答案
这并没有多大意义,创造了小提琴此代码。您有几个组,每个组都有不同数量的过滤字母。应显示哪些数字? –
你应该已经完成了所有这些在你的控制器 –
我需要的总过滤器 –