title: Angularjs filter not working with ng-repeat
body: <p>Angularjs filter not working with ng-repeat when I change filter value with a function... I am new to angularjs.</p>
  
  <p>These are my html buttons from which the filter value must be changed with the function on 'ng-click';</p>
  
  <pre><code>&lt;span&gt;
      &lt;a class="button button-stable" ng-class="class('static')"
         ng-click="activate('static','','')"&gt;
          All
      &lt;/a&gt;
  &lt;/span&gt;
  &lt;span ng-repeat="profiles in cardList | unique:'profile'"&gt;
      &lt;a class="button button-stable" ng-class="class($index)"
         ng-click="activate($index,profiles,profiles.profile);"&gt;
          {{profiles.profile}}
      &lt;/a&gt;
  &lt;/span&gt;
  </code></pre>
  
  <p>These are my controller functions;</p>
  
  <pre><code>$scope.cardList = [
      {id: 1, serial_number: '35986580', card_number: 'BG9S8W7DJSKLA9', profile: '512', expiry_date: '5-1-2017'},
      {id: 2, serial_number: '35986581', card_number: 'ASLWODS6F5812H', profile: '512', expiry_date: '5-1-2017'},
      {id: 3, serial_number: '35986582', card_number: '9A5S218LSKJBMC', profile: '768', expiry_date: '5-1-2017'},
      {id: 4, serial_number: '35986583', card_number: 'XLCKDIGOSJS092', profile: '1024', expiry_date: '5-1-2017'},
      {id: 5, serial_number: '35986584', card_number: 'XKSODKO0CNJSUW', profile: '1024', expiry_date: '5-1-2017'},
      {id: 6, serial_number: '35986585', card_number: 'PLHG0G9M746172', profile: '2048', expiry_date: '5-1-2017'},
      {id: 7, serial_number: '35986586', card_number: '5DF888F9EGVNDJ', profile: '2048', expiry_date: '5-1-2017'},
      {id: 8, serial_number: '35986587', card_number: 'D6F5G49ILMA9SF', profile: '4096', expiry_date: '5-1-2017'}
  ];
  $scope.class = function(index, item){
      if ($scope.selected == index){
          return 'button-dark active';
      } else {
          $scope.staticAll = '';
          return '';
      }
  }
  $scope.activate = function(index, item, profile){
      if (index != 'static'){
          $scope.selected = index;
          $scope.filterProfile = profile;
          $scope.staticAll = '';
      } else {
          $scope.selected = 'static';
          $scope.filterProfile = '';
          $scope.staticAll = 'button-dark active';
      }
  }
  </code></pre>
  
  <p>And this is where the filter is not working;</p>
  
  <pre><code>&lt;tr ng-repeat="card in cardList | filter: filterProfile"&gt;
                  &lt;td class="center"&gt;{{card.profile}}&lt;/td&gt;
                  &lt;td class="center"&gt;{{card.expiry_date}}&lt;/td&gt;
                  &lt;td class="center"&gt;&lt;a class="button button-medium button-energized"&gt;Assign&lt;/a&gt;&lt;/td&gt;
              &lt;/tr&gt;
  </code></pre>
  
  <p>This is an image;</p>
  
  <p><img src="https://i.stack.imgur.com/w5tBy.png" alt="screenshot"></p>
  
  <p>I want to filter the results with profile buttons, but the value of 'filterProfile' is not changing...</p>
  
  <p>Please help...</p>