mardi 20 janvier 2015

Keep checkbox checked or unchecked based on some value

I am using checkbox



<input type="checkbox" value="{{areaFilter.area_name | lowercase}}" ng-checked="true" />


I want to keep checkbox already checked or unchecked while page loading depend on some value (selectedArea) : Like



if(selectedArea.indexOf(areaFilter.area_name) > -1)


Then



ng-clicked="true"


else



ng-clicked="false"


How can I do this in HTML page.


Please guide.





Aucun commentaire:

Enregistrer un commentaire