Referencing this, what I have should have worked:
<div ng-show="openGroup == group.id" ng-repeat="member in group.members">
<ion-item class="item item-accordion item-toggle">
<h3>{{ member.firstName }} {{ member.lastName }}</h3>
<label ng-show="member.lead">Lead</label>
<label class="toggle toggle-positive">
<input ng-click="toggleClicked(member.id, $event.target.value)" type="checkbox">
<div class="track">
<div class="handle"></div>
</div>
</label>
</ion-item>
</div>
When toggleClicked
is called, I output the value of $event.target.value
. It doesn't matter whether the checkbox is checked or not, the value that is output is always on
. I would have thought that once the checkbox is unchecked, the value would be returned as off
?
I attempted to create a plunkr for this but it didn't want to work even though the code is correct.