Angularjs 控制器中的角度精确滤波器
$scope.gradeC=$filter('filter')($scope.results.subjects,{grade:'C'})[0] 这将给出匹配的结果Angularjs 控制器中的角度精确滤波器,angularjs,filter,Angularjs,Filter,$scope.gradeC=$filter('filter')($scope.results.subjects,{grade:'C'})[0] 这将给出匹配的结果 您知道如何只过滤精确匹配项吗?您可以将严格的比较器标志作为参数传递给过滤器 $scope.gradeC = $filter('filter')($scope.results.subjects, {grade: 'C'}, true)[0]; Ref:doc您可以将严格的比较器标志作为参数传递给过滤器 $scope.gradeC =
您知道如何只过滤精确匹配项吗?您可以将严格的比较器标志作为参数传递给过滤器
$scope.gradeC = $filter('filter')($scope.results.subjects, {grade: 'C'}, true)[0];
Ref:doc您可以将严格的比较器标志作为参数传递给过滤器
$scope.gradeC = $filter('filter')($scope.results.subjects, {grade: 'C'}, true)[0];
Ref:doc您可以将严格的比较器标志作为参数传递给过滤器
$scope.gradeC = $filter('filter')($scope.results.subjects, {grade: 'C'}, true)[0];
Ref:doc您可以将严格的比较器标志作为参数传递给过滤器
$scope.gradeC = $filter('filter')($scope.results.subjects, {grade: 'C'}, true)[0];
参考:doc