Skip to main content
Source Link
code1
  • 9.2k
  • 9
  • 29
  • 31

How to call a function on checking a checkbox in angular 2.0

I am currently using angular 2.0. In HTML, I have a checkbox, the code is as mentioned below.

<div style="margin-left:15px;">
            <label>Draw</label>
            <input id="isCheckBox" type="checkbox" checked="checked">
</div>

How to call a function only if a checkbox is checked in typescript file?