我从数据库到angularJs得到Bool值
<td>
{{patient.Alcoholic}}
</td>
Run Code Online (Sandbox Code Playgroud)
而不是假或我需要打印是或否
<td>
{{patient.Alcoholic // can i have if-else condition over here ??}}
</td>
Run Code Online (Sandbox Code Playgroud)
小智 13
<td>
{{true == patient.Alcoholic ? 'Yes' : 'No' }}
</td>
Run Code Online (Sandbox Code Playgroud)
这应该工作!
Sud*_*n S 10
使用ng-if指令
<td ng-if="patient.Alcoholic">Yes</td>
<td ng-if="!patient.Alcoholic">NO</td>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
8510 次 |
| 最近记录: |