Hi I am new to angular2 and type script. I am trying to develop multiselect dropdown in angularjs2. I have my plain html as below. I refered How to use Checkbox inside Select Option from stackoverflow.
<div class="selectBox" (click)="showCheckboxes()">
</div>
<div id="checkboxes" [style.display]="expanded ? 'block' : 'none'">
<label for="one">
<input type="checkbox" id="one" />First checkbox
</label>
<label for="two">
<input type="checkbox" id="two" />Second checkbox
</label>
<label for="three">
<input type="checkbox" id="three" />Third checkbox
</label>
</div>
in component i have
showCheckboxes() {
expanded =expanded;
}
also i declared expanded = false; in component. function showCheckboxes is written in js. I am trying to write same thing in type script. Can someone help me to make it work on angular2?