title: ng-repeat not accessing $scope variable
body: <p>$scope.new is a variable..that i am trying to access in ng-repeat but ng-repeat treats 'new' as a local variable and changes its value within its scope only...i want to give particular index to $scope.new variable...without using functions...thank you....</p>
  
  <pre><code>&lt;html&gt;
  &lt;style&gt;
  .yoyo{font-size:30px;}
  &lt;/style&gt;
  
  
  &lt;script src= "http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"&gt;&lt;/script&gt;
  &lt;script&gt;
  var app = angular.module('myApp', []);
  app.controller('customersCtrl', function($scope) {
  $scope.new=0;
  });
  &lt;/script&gt;
  
  &lt;body&gt;
  
  &lt;div data-ng-app="myApp" ng-controller="customersCtrl" data-ng-init="names=['Jani','Hege','Kai']"&gt;
    &lt;p&gt;Looping with ng-repeat:&lt;/p&gt;
    &lt;ul&gt;
      &lt;li data-ng-repeat="x in names" ng-click="new=$index" ng-class="yoyo:new==$index"&gt;
        {{ x }}{{$index}}{{new}}
      &lt;/li&gt;
    &lt;/ul&gt;
  
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>