lundi 27 juillet 2015

conflict in ng-model and name property in checkbox

I have code like this ...

<input type="checkbox" ng-model="checked3" ng-init="checked3=true" name="checkBoxRangeVal" />
<div class="add-required-validation" ng-show="checked3">
</div>

In here what I do is from the document load I set the checkbox value to true. Using angular I show and hide the div and catch the checkbox value using checkbox's name property.

but when the form begin it show the div but checkbox not have a checked. ( that means check box not show the tick)

How I solve this??

Or can someone suggest me a alternative way to do this??




Aucun commentaire:

Enregistrer un commentaire