title: Highlight the selected anchor tag in Angularjs (using ng-repeat)
body: <p>I have some data and i have bind the data in <code>anchor</code> tag  using ng-repeat</p>
  
  <pre><code>&lt;table style="width: 60%"&gt;
                  &lt;tr&gt;
                      &lt;td style="text-align: center" ng-repeat="displayyears in displayYears"&gt;
                          &lt;div&gt;
                              &lt;a href="javascript:void(0)" style="padding: 30px,30px,30px,30px; font-size: 18px" ng-class="StyleOfYear" ng-click="selectedYear(displayyears,this)"&gt;{{displayyears}}&lt;/a&gt;
                          &lt;/div&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/table&gt;
  </code></pre>
  
  <hr>
  
  <p><strong>Here is my css code</strong> </p>
  
  <pre><code>&lt;style&gt;
      .slectedYear {
          background-color: red;
      }
  
      .loadYear {
          background-color: none;
      }
  &lt;/style&gt;
  </code></pre>
  
  <hr>
  
  <ul>
  <li>Now i want to change the <strong>selected</strong> anchor tag background color. I have tried the below code.</li>
  </ul>
  
  <p><strong>Js code</strong> </p>
  
  <pre><code>//Controller 
   $scope.StyleOfYear = "loadYear";
    $scope.selectedYear = function (value, context) {
              context.$parent.StyleOfYear = "slectedYear";
              $scope.selectedYearValue = value;
          }
  </code></pre>
  
  <p>But am going wrong, because my code  helps to change all anchor tag's background color,  But i want to change the selected anchor tag background color. </p>
  
  <hr>
  
  <p>Now my code is select all anchor tags when i click 2015 
  <img src="https://i.stack.imgur.com/D81CA.jpg" alt="enter image description here"></p>
  
  <hr>
  
  <p>But i want to change the background color of 2015 anchor tag only, if i click 2015. And all other anchor tag's bg-color should be  non. </p>
  
  <p><strong>look like the below image</strong> </p>
  
  <p><img src="https://i.stack.imgur.com/Qk6oJ.jpg" alt="enter image description here"></p>
  
  <hr>
  
  <p><strong>Simply Am trying to change the  color of active menu concepts, but i  don't know how can i do with <code>ng-repeat</code></strong> </p>