In my app I have the following checkbox
<input class="js-rooms"
id="checkid"
ng-keypress="$event.keyCode == 13 && getItem(0)"
ng-click="getItem(0)"
type="checkbox"/>
When the input is clicked and checked then the function getItem(0) is called.
However, when I click the checkbox again and uncheck it and re-submit then the same function gets fired, obviously.
What I would like to do(in the simplest way possible) is to fire off the function getItem(1) when the checkbox is clicked and fire off getItem(0) when the checkbox is NOT clicked. I am looking for the simplest solution possible. Any thoughts?