我有一個名爲的節目頁面有序列其打印訂單號爲:如何使用Angular編寫嵌套條件?
<div class="col-sm-2 detail" ng-if="clTxn.ordered">
<a ng-if="relTransaction.txnType == 'Order'" ng-repeat="relTransaction in clTxn.relTransactions" ui-sref="order({id: relTransaction.txnId })">{{'Ord#'}}</a>
<div class="title">Ordered</div>
</div>
這是工作的罰款與秩序,現在我需要添加相同relTransaction.txnType == 'Purchase'
時。 我是新角度,但我試圖把上面的訂單與購買訂單,但沒有爲我工作。
注意兩個訂單和採購必須在此條件下:
'ng-if' => 'clTxn.ordered'
請幫助我。
你可以發佈整個模板代碼嗎? 你把這些條件放在哪裏?在模板中的標籤的屬性? 我不明白 – Zorgatone
其實我只是需要在** {'ng-if'=>'clTxn.ordered'} **下寫一個額外的ng-if條件,就像'ng-if'=> 「relTransaction.txnType =='Order'' as shown shown in question。 – venkat
哦,我現在看到了,它是一個HTML預處理器嗎? 請爲無法讀取它的人編寫HTML代碼 – Zorgatone