Reputation: 11
<div ng-repeat="d in data" ng-if="data.length>0">
<div ng-bind="d.aa"></div>
<div ng-bind="d.bb"></div>
<div ng-if="d.test == 'true'">
<div ng-bind="it's test" />
</div>
</div>
</div>
Content:
Please help this
Upvotes: 1
Views: 3443
Reputation: 372
<div ng-repeat = "data in comments">
<div ng-if="data.length >0">
//different template with 0 data
</div>
<div ng-if="data.type == 'story' ">
//different template with story data
</div>
<div ng-if="data.type == 'article' ">
//different template with article data
</div>
</div>
you can use also
<li ng-repeat="r in results">
<!-- If r.date contains a value, show it -->
<span ng-if="r.date">{{r.date}}</span>
<!-- If r.date does not contain a value show placeholder text -->
<span ng-if="!r.date">Date not confirmed yet.<span>
</li>
Upvotes: 4