Angular: Empty Fiddle

http://angularjs.org/

by Sajeetharan Sinnathurai

HTML

<script src="http://code.angularjs.org/angular-1.0.1.js"></script>
 
 <body ng-controller="MyCtrl" ng-init="customers = [
{'name':'John', 'city':'Doe'},
{'name':'Anna', 'city':'Smith'},
{'name':'Peter', 'city':'Jones'}
]">
<div>
<div class="span12">
        <h1>{{name}}</h1>
        <br/>
        <p>{{city}}</p>
        <button type="button" name="button" value="Next" ng-click="makeIterator(customers)"></button>
        <div ng-if="isclicked">
        <li  ng-repeat="x in customers ">
          {{x.name}}
        </li>
        </div>
    </div>
 

</div>
</body>

JavaScript

var myApp = angular.module('myApp',[]);
function MyCtrl($scope) {
   $scope.isclicked =  = false;
   $scope.makeIterator = function(item)
   {
   $scope.isclicked =  true;
     
   }
}