Checkbox checked if boolean is true with Angular2
问题 I would like to know how to make a checkbox checked if the value is true, and unchecked if false with Angular2 . Adult <input type="checkbox" value="{{person.is_adult}}"> {{person.is_adult}} is a boolean Can someone please suggest anything? Thanks 回答1: {{}} does string interpolation and stringifies true and false and Angular by default uses property binding and I assume the property expects boolean values not strings: <input type="checkbox" [checked]="person.is_adult"> This might work as well