title: How to programmatically check checkbox with dynamic model name?
body: <p>I have created a some checkboxes with dynamic model name like this:</p>
  
  <pre><code>&lt;label ng-repeat="item in main.itemDetails"&gt;
    &lt;input type="checkbox" checklist-value="item.price"
    ng-click="itemChanged(item)" ng-model="checkboxes[item.name]"&gt;
     {{item.name}} - &lt;b&gt;{{item.price}} €&lt;/b&gt;
     &lt;br&gt;
  &lt;/label&gt;
  </code></pre>
  
  <p>In my controller, I want to check some checkboxes if their model's name exists in array $scope.selectedItems.</p>
  
  <p>I'm trying to do something like this but it isn't working:</p>
  
  <pre><code>for (var i = 0, j = $scope.selectedItems.length; i&lt;j; i++) {
              $scope['selectedItems[i].name'].isChecked = true;
          }
  </code></pre>
  
  <p>for example if item.name = 'Item1' I want the model to be named $scope.Item1 and later I want to call <code>$scope.Item1.isChecked = true;</code></p>
  
  <p>What Am I doing wrong here?</p>