我有角度过滤器,当我使用它时,他总是什么都不返回,但我有条件适当的值
$scope.seasonIncludes = [];
function changeInputState(event) {
angular.element(event.target).toggleClass('active');
}
$scope.includeSeason = function(season, event) {
$scope.seasonIncludes = []
$scope.seasonIncludes.push(season.season_number);
changeInputState(event)
};
$scope.seasonFilter = function(series) {
if ($scope.seasonIncludes.length > 0) {
if ($.inArray(series.season.season_number, $scope.seasonIncludes) < 0) return;
}
return $scope.series;
};
}]);