Converting Boolean to YES or NO to Angularjs

Asked

Viewed 841 times

2

I have the following table structure in my form HTML:

<tbody>
    <tr nr-repeat="p in model.previdencias">
        <td>{{p.NomeDependente}}</td>
        <td>{{p.IsAtivo}}</td>
    </tr>
</tbody>

The attribute p.IsAtivo is the type boolean returning true or false. I’d like to make a ifinline to write Yes or No in the table column according to the field value. I did it this way, but it didn’t work:

<td>{{p.IsAtivo ? 'Sim' : 'Não'}}</td>

How should I do ?

1 answer

2


Browser other questions tagged

You are not signed in. Login or sign up in order to post.