angular.js - 如何在页面中把ng-repeat遍历出来的xxx.yyy(字符串) ,过滤成数组
淡淡烟草味
淡淡烟草味 2017-05-15 17:02:33
0
1
569

<tr ng-repeat="ins in  instances">
  <td ><input type="checkbox" ng-model="icheckedList[ins.id]" ng-required="{{needOneList}}" ng-checked="all" one-least></td>
  <td><span ng-bind="ins.name"></span></td>
  <td><table><tr ng-repeat="p in ins.private_ip|privateip"></tr></table></td>
  <td ng-bind="ins.public_ip"></td>
</tr>

.filter('privateip',function() {
    return function(p) {
        p.split(',');
        return p
    }
})

其中 ins.private_ip是一个 形如 1.2.3.4,94.8.7.6 的字符串
怎么才能把 ins.private_ip 过滤成列表 p in ins.private_ip|privateip似乎是过滤的遍历出来的p?

淡淡烟草味
淡淡烟草味

모든 응답(1)
Ty80

목록으로 필터링한다는 것은 무엇을 의미하나요? 뭐하세요? 먼저 변경해 드릴 수 있지만 어떤 기능을 하는지는 모르겠습니다.

으아악
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿
회사 소개 부인 성명 Sitemap
PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!