Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angularjs 控制器中的角度精确滤波器_Angularjs_Filter - Fatal编程技术网

Angularjs 控制器中的角度精确滤波器

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'})[0]

这将给出匹配的结果


您知道如何只过滤精确匹配项吗?

您可以将严格的比较器标志作为参数传递给过滤器

$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