在Ionic中,我试图使用Ionic列表编写相同的代码。 下面是我的html模板供参考。
<ion-view>
<ion-content>
<ion-list class="product_father">
<ion-item class="back_style span_txt_color" ng-repeat="playorderslist in playorderslists">
<span class="span_txt_color"><b>REFERENCE:</b>
{{playorderslist.reference}} <span class="span_txt_color2" >
{{playorderslist.date_add}}</span> <br>
<br/>{{playorderslist.payment}}<br>
<span class="span_txt_color1" style="background-color:
{{playorderslist.order_state_color}}; width:100%">{{playorderslist.order_state}}</span><BR><br>
<b>TOTAL PRICE:</b>{{playorderslist.total_paid}}
// i want to put here my condition
<a class="bc_a_color" target="_blank" href="https://test.com/pdfinvoicemobile?id_order={{playorderslist.id_orders}}">PDF</a>
</ion-item>
</ion-list>
<div id="load_html" >
</div>
<div id="load_html_browse">
<div class="same_footer"></div>
</ion-content>
</ion-view>
答案 0 :(得分:0)
使用这样的条件语句
<a *ngIf="Yourcondition" class="bc_a_color" target="_blank" href="https://test.com/pdfinvoicemobile?id_order={{playorderslist.id_orders}}">PDF</a>