I have a checkbox.
If checked -> call one function displayBus(number)
If unchecked -> call other function displayCar()
The problem with this code is that I have to click also in hide or show to call the function.
<input type="checkbox" id="mycheckbox" name="mycheckbox" ng-model="mycheckbox" />
<div ng-show="mycheckbox">
<a style="cursor: pointer;" ng-click="displayBus(number);">hide</a>
</div>
<div ng-hide="mycheckbox">
<a style="cursor: pointer;" ng-click="displayCar();">show</a>
</div>
But I just want to check / Uncheck and then call automaticly the function. I DO NOT want to click on hide or show.
Thanks for your help.