Trying to filter out items with a certain property that is not null So for:
var details = [{name:'Bill', shortDescription: null}, {name:'Sally', shortDescription: 'A girl'}]
I would like to only show one li; the one for sally. This is what I have tried with no success
<ul>
<li ng-repeat="detail in details | filter:{shortDescription:'!'}">
<p>{{detail.shortDescription}}</p>
</li>
</ul>
Any idea how I can do this without creating a custom filter? Or even so, what the custom filter would look like?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…