I have recieved object from server and trying to display its fields in table. All fields are displaying well but boolean is always displaying as "no".
<tr ng-repeat="u in ctrl.users">
<td><span ng-bind="u.id"></span></td>
<td><span ng-bind="u.name"></span></td>
<td><span ng-bind="u.age"></span></td>
<td><span ng-bind="u.isAdmin ? 'yes' : 'no'" ></span></td>
</tr>
I was trying to add filter, but result was the same.
Double check you have the property name right in code.
You can print the u
object as json with
<pre>{{u | json}}</pre>
I'm pretty sure that if the value is in the database and isn't false or null, then you have the name wrong, and it's not isAdmin
but something else.
EDIT: Looks like I was right and you were using the property name admin
instead.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With