Dismiss
Announcing Stack Overflow Documentation

We started with Q&A. Technical documentation is next, and we need your help.

Whether you're a beginner or an experienced developer, you can contribute.

Sign up and start helping → Learn more about Documentation →

I want to uncheck the checkbox from the list of checkbox depending upon the condition.Checkboxes are generated from the ng-repeat

HTML

<li ng-repeat="col in columns">
    <span class="inputH">
         <input type="checkbox" value="col.name"   ng-if="col.default === true" checked ng-click="onColSelect(col.name,$event)" id="column_{{$index}}">
         <input type="checkbox" value="col.name"  ng-if="col.default === false" ng-click="onColSelect(col.name,$event)" id="column_{{$index}}">
    </span>
    <span class="textH">{{ 'leadOpportunityHeader.' + col.name | translate }}</span>
</li>

while cliking each checkbox, I check some condition. If this condition is true then I uncheck the same checkbox. My question is is it possible to uncheck the checkbox without using ng-model? If its not possile then I need to know how will I do this with the help of ng-model

share|improve this question

you can use ng-checked to check and uncheck checkbox instead of ng-model.

ng-checked=true or false
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.