Set checkbox checked value

Hello everyone,

Iam doing a simple app using a list of checkboxes.
Here is my template:

     <ion-item ng-repeat="configList in configLists">
            <label class="checkbox">
              <input type="checkbox" checked="configList.selected" ng-click="addToApiList(">

So this list is ok and the names are ok, but since i try to set the ‘checked’ value by hand, it turns that all my checkboxes are true.

I tried this, and this also gives me all checkbox true:

<input type="checkbox" checked="" ng-click="addToApiList(">

Maybe Iam doing something wrong, but it seem I can not set the checked value.

How can I do to initialise my ‘checked’ values when i create my list ?

Thank you

Take a look at our checkbox example, see if there is anything off from that.

1 Like

Hello, in my case I resolve this issue in my codes with a map function.

on my controller i have this:

    interest.checked = $scope.configListChecklist.includes(;

where configListChecklist is my array with checked values.

NOTE: I know this was posted in 2k14, but I got this today when facing that issue, so, hope it help :wink:

1 Like