title: Setting Value for Dynamic ngModel inside ngRepeat
body: <p>How do I set the value of a dynamically created ng-model inside of ng-repeat?</p>
  
  <p>I'm trying to set each dynamic ng-model to <code>true</code> or <code>false</code></p>
  
  <p>html file</p>
  
  <pre><code>&lt;md-list-item ng-repeat="awayTeamPlayer in ulineup.awayTeamPlayersLineup "&gt;
      &lt;md-checkbox ng-model="ulineup.awayTeamPlayersPlayed[awayTeamPlayer.player]"&gt;&lt;/md-checkbox&gt;
      {{awayTeamPlayer.player}}
  &lt;/md-list-item&gt;
  </code></pre>
  
  <p>controller file</p>
  
  <pre><code>(function() {
  
      angular
          .module('app')
          .controller('UpdateLineUpController',
                      ['$routeParams', '$firebaseArray', 'FIREBASE_URL',
                      function($routeParams, $firebaseArray, FIREBASE_URL) {
  
              var vm = this;
              var gameId = $routeParams.gameId;
              var lineupId = $routeParams.lineupId;
              var awayTeamPlayersLineupRef = new Firebase(FIREBASE_URL + 'games/' + gameId + '/lineup/' + lineupId + '/awayTeamPlayersLineup');
              vm.awayTeamPlayersLineup = $firebaseArray(awayTeamPlayersLineupRef);
  
              // tried the following but that doesn't work
              angular.forEach(vm.awayTeamPlayersLineup, function(value, key) {
                  if(value.played === true) {
                      // trying to set ng-model value to true gives me the following error
                      // TypeError: Cannot set property 'Mark' of undefined
                      vm.awayTeamPlayersPlayed[value.player] = true;
                  } else {
                      vm.awayTeamPlayersPlayed[value.player] = false;
                  }
              });
  
          }]);
  
  })();
  </code></pre>