samedi 2 décembre 2017

angular 2 checkbox binding error

i am binding the checked attribute of checkbox with a model like this

<td (click)="changeUserStatus(
  <div class="checkbox">
    <label>
    <input type="checkbox" id="userstatus" name="userstatus" [checked]="(user.status==='true')?true:false"> 
   </label>
 </div>
</td>

I even checked this condition (user.status==='true')?true:false which is yielding true. But the checkbox isnt getting checked no matter what.

Please help!!




Aucun commentaire:

Enregistrer un commentaire