Multiple conditions in ternary conditional operator?

后端 未结 7 862
醉酒成梦
醉酒成梦 2021-01-04 12:20

I am taking my first semester of Java programming, and we\'ve just covered the conditional operator (? :) conditions. I have two questions which seem to be wanting me to \"n

相关标签:
7条回答
  • 2021-01-04 13:13

    -In my case, I have an "isloadingMakePayment" flag based on the flag I have to implement Loading bar over That Tag.It means when isloadingMakePayment is true tag show "Loading Data..." instead. Implemented multiple conditions.

    -An "isPolicyRename" is also a flag that I used for inside condition.MeanWhile "renamePolicy" is variable which contain some value that I use to show over HTML page

    • Simply use this pattern :

    <a class="btn btn-orange" (click)="onMakePayment()"> <span *ngIf="isloadingMakePayment"><i class='fa fa-spinner fa-spin'></i>Loading Data...</span>{{isloadingMakePayment ? '' : isPolicyRename 'Make Payment to ' + renamePolicy : 'Make Payment' }} </a>


    Thank you.

    0 讨论(0)
提交回复
热议问题