I'm Creating Multiple checkbox using ng-repeat
. How to validate such form if any one of checkbox is checked using form validation?
<div class="checkbox" ng-repeat="nereg in northeastRegion track by $index" ng-click="nereg.selected = !nereg.selected">
<input type="checkbox" ng-checked="nereg.selected" >
<label for=""></label>
</div>
JS
$scope.northeastRegion = [{
title: 'New England',
selected: false
},
{
title: 'New York Metro',
selected: false
},
{
title: 'Philly Tri-State',
selected: false
},
{
title: 'Upstate New York',
selected: false
},
{
title: 'Washignton',
selected: false
}
];
Aucun commentaire:
Enregistrer un commentaire