«angular-filters» 태그된 질문


8
AngularJs에서 ng-repeat로 (키, 값)을 필터링하는 방법은 무엇입니까?
나는 다음과 같은 것을 시도하고 있습니다. <div ng-controller="TestCtrl"> <div ng-repeat="(k,v) in items | filter:hasSecurityId"> {{k}} {{v.pos}} </div> </div> AngularJs 부분 : function TestCtrl($scope) { $scope.items = { 'A2F0C7':{'secId':'12345', 'pos':'a20'}, 'C8B3D1':{'pos':'b10'} }; $scope.hasSecurityId = function(k,v) { return v.hasOwnProperty('secId'); } } 하지만 왠지 모든 항목을 보여주고 있습니다. (키, 값)을 어떻게 필터링 할 …

당사 사이트를 사용함과 동시에 당사의 쿠키 정책개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.