Arjun Arjun - 3 years ago 161
AngularJS Question

AngularJS Print Yes or No based on boolean value

I'm getting Bool value from database to angularJs

<td>
{{patient.Alcoholic}}
</td>


instead of false or ture i need to print YES or NO

<td>
{{patient.Alcoholic // can i have if-else condition over here ??}}
</td>

Answer Source
<td>
 {{true == patient.Alcoholic ? 'Yes' : 'No' }}
</td>

This should work!

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download