为什么我的滤镜总是什么都没有

时间:2016-06-27 16:46:52

标签: javascript angularjs

我有角度过滤器,当我使用它时,他总是什么都不返回,但我有条件适当的值

$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;
                    };      
    }]);

0 个答案:

没有答案