这是我的角度代码。
$scope.names = [
{name: 'Tobias', gender: 'm'},
{name: 'Jeff', gender: 'm'},
{name: 'Lisa', gender: 'f'},
{name: 'Diana', gender: 'f'},
{name: 'James', gender: 'm'},
{name: 'Brad', gender: 'm'}
];
$scope.filteredNames = filterFilter($scope.names, 'a');
$scope.filteredNamesByFemale = filterFilter($scope.names, {gender: 'f'});
我想知道如何链接两个过滤器filterFilter($scope.names, 'a')
和filterFilter($scope.names, {gender: 'f'})
答案 0 :(得分:0)
在第二次通话中通过$scope.filteredNames
而不是$scope.names
。