title: AngularJS - controller method doesn't get called on ngClick - no error
body: <p>I try to call the method <code>removePlayer(playerId)</code> if a button gets clicked. But, the method doesn't get called, or at least the statements inside it aren't firing, because I put a <code>console.log()</code> statement at the top.</p>
  
  <p>The console is empty, so I'm really clueless. Here is my code:</p>
  
  <p>Controller:</p>
  
  <pre><code>function appController($scope) {
      $scope.players = [];
      var playercount = 0;
  
      $scope.addPlayer = function(playername) {
  
          $scope.players.push({name: playername, score: 0, id: playercount});
          playercount++;
      }
  
      function getIndexOfPlayerWithId(playerId) {
          for (var i = $scope.players.length - 1; i &gt; -1; i--) {
              if ($scope.players[i].id == playerId)
                  return i;
          }
      }
  
      $scope.removePlayer = function(playerId) {
          console.log("remove");
          var index = getIndexOfPlayerWithId(playerId);
          $scope.players.slice(index, 1);
      }
  }
  appController.$inject = ['$scope'];
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>...
  &lt;table id="players"&gt;
          &lt;tr ng-repeat="player in players"&gt;
              &lt;td&gt;{{player.name}}&lt;/td&gt;
              &lt;td&gt;{{player.score}}&lt;/td&gt;
              &lt;td&gt;&lt;button ng-click="removePlayer({{player.id}})"&gt;Remove&lt;/button&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/table&gt;
  ...
  </code></pre>