.filter('privateip',function() {
return function(p) {
p.split(',');
return p
}
})
<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>
ins.private_ip is a string (like '192.168.1.1,192,168.1.2,192.168.1.8') which i want to transform to array, how can i do that use the filter or any way you recommend.