The project is a news category, and the list contains two forms (mixed), one is in pure title form, and the other is in picture form (three pictures are displayed side by side). The data returned by the background has a field to identify the presentation form. How to distinguish and display it in ionic. The currently used <ion-item ng-repeat="item in items"> is stuck, please give me some advice.
How to use different templates according to the background during repeat?
高洛峰2017-05-15 17:07:41
<p ng-if="items[0].type==1">
<ion-item ng-repeat="item in items">...
</p>
<p ng-if="items[0].type==2">
<ion-item ng-repeat="item in items">...
</p>
世界只因有你2017-05-15 17:07:41
<ion-item ng-repeat="item in items">
<p ng-if="items[0].type==1">
{{items[0].title}}
</p>
<p ng-if="items[0].type==2">
{{items[0].img}}
</p>
</ion-item>