I have a list of checkbox
<input type="checkbox" ng-model="servicesModel" value={{item.name}} id={{item.name}} ng-click="toggleSelection(item.name)"/>
and I want to deselect the selected checkbox
$scope.toggleSelection = function toggleSelection(id) {
window.alert("You can't select this !");
//deselect the selected checkbox
}
Every thing is working fine but I can't found how I could deselect the selected one.
Aucun commentaire:
Enregistrer un commentaire