Try:
<p ng-repeat="yeah in obj"> {{yeah || ' ' }}</p>
Working example: http://jsfiddle.net/63wWe/
문제
I have my controller set up like this:
function MyCtrl($scope) {
$scope.obj = ["MobilePhone",null,"HomePhone"];
}
and im using an ng-repeat:
<div ng-controller="MyCtrl">
<p ng-repeat="yeah in obj"> {{yeah}}</p>
</div>
and I need to show the empty space from the null value like this:
MobilePhone
HomePhone
but instead im getting this:
MobilePhone
HomePhone
Any help would be nice.
해결책
Try:
<p ng-repeat="yeah in obj"> {{yeah || ' ' }}</p>
Working example: http://jsfiddle.net/63wWe/