title: Syntax Error: Token '{' Invalid Key - Errors even when displaying correctly
body: <p>I'm struggling here (I am new to programming still), I have an ng-repeat that is repeating a list (page on Pages) which displays the correct number on the front end (i.e. 1) but, when I try and use the same for the ng-click, it will throw this error:</p>
  
  <pre><code>Error: [$parse:syntax] Syntax Error: Token '{' invalid key at column 31 of the expression [getCtrlScope().currentPage = {{ page }}] starting at [{ page }}].
  </code></pre>
  
  <p>What is strange is that it will display it correctly within the HTML code correctly but will not function.</p>
  
  <p><b>Code:</b></p>
  
  <pre><code>&lt;li class="page-item" ng-repeat="page in Pages"&gt;
      &lt;a class="page-link" ng-click="getCtrlScope().currentPage = {{ page }}"&gt;{{ page }}&lt;/a&gt;
  &lt;/li&gt;
  </code></pre>
  
  <p><b>What shows when rendered in HTML:</b></p>
  
  <pre><code>&lt;li class="page-item ng-scope" ng-repeat="page in Pages"&gt;
     &lt;a class="page-link waves-effect ng-binding" ng-click="getCtrlScope().currentPage = 2"&gt;2&lt;/a&gt;
  &lt;/li&gt;
  </code></pre>
  
  <p><b>JS</b></p>
  
  <pre><code>var MyApp = angular.module('MyApp', []);
  
  MyApp.controller('MyCtrl', function ($scope, $filter) {
      $scope.Users = tJSONData;
      $scope.currentPage = 0;
      $scope.pageSize = 3;
      $scope.search = '';
      $scope.Pages = [1, 2, 3];
  
      $scope.getData = function () {
          return $filter('filter')($scope.Users, $scope.search)
      }
  
      $scope.updatePage = function() {
          $scope.$apply(function () {
              $scope.Users = tJSONData
          })
      }
  
      $scope.numberOfPages = function () {
          return Math.ceil($scope.getData().length / $scope.pageSize);
      }
  
      $scope.getCtrlScope = function () {
          return $scope;
      }
  });
  
  MyApp.filter('startFrom', function () {
      return function (input, start) {
          start = +start; //parse to int
          return input.slice(start);
      }
  });
  </code></pre>
  
  <p>I've looked around but pretty much all the fixes have been by removing {{ }}, some it has worked for because it was rendering incorrectly but it seems mine is rendering correctly.</p>
  
  <p>If anyone has any ideas, it'd be a great help :)</p>