title: AngularJS - Checkbox get the id from checked object
body: <p>as you can see I have a list of objects in my modal with a checkbox on the right side. Now I want to click the checkbox and only check one single item. Right now when I click on one checkbox, everthing gets checked. But the main thing is that I want to archieve the following: </p>
  
  <p>I want to click on the checkbox and get the id or the team that is checked. Thank you for your help!</p>
  
  <p><strong>This is my modal:</strong></p>
  
  <pre><code>&lt;div class="col-md-12"&gt;
      &lt;ul class="list-group"&gt;
          &lt;li ng-repeat="team in teams" class="list-group-item"&gt;{{ team.allUserTeamName + " - " + team.allUserTeam }}
  
              &lt;label ng-repeat="(feature,enabled) in features"&gt;
                   &lt;input type="checkbox" ng-model="features[feature]"/&gt;
              &lt;/label&gt;
  
          &lt;/li&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
  
  &lt;div class="modal-footer"&gt;
      &lt;div class="col-md-12"&gt;
          &lt;div class="row pad-team-selection-view"&gt;
              &lt;button class="btn btn-info"
                   ng-click="createGameplanWithSelectedMembers(team)"&gt;Spielplan
                                          erstellen
              &lt;/button&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  {{features.value}}
  </code></pre>
  
  <p><strong>This is my controller:</strong></p>
  
  <pre><code>app.controller('modalCreateGameplanController', ['$scope', '$timeout', '$http', '$firebaseArray', '$firebaseObject', function($scope, $timeout, $http, $firebaseObject, $firebaseArray) {
  
      $scope.selectUsers = 'Users';
  
      $scope.$on('modal', function(event, args) {
  
          var ref = firebase.database().ref("users");
          var teams = $firebaseObject(ref);
  
          $scope.features = {
              value: false
          };
  
  
          teams.$loaded().then(function() {
              $scope.teams = [];
              angular.forEach(teams, function(key) {
                  $scope.teams.push({
                      allUserTeamName: key.firstname,
                      allUserTeam: key.team
                  });
  
              });
          });
      });
  }]);
  </code></pre>