0

I have just started angular js and goiong through a tutorial and have this code which doesn't work.

Please enlighten the mistake

code is:

       <html data-ng-app="">
       <head>
          <title>My script 2 ANJS</title>
       </head>
       <body>
           <div data-ng-controller="SimpleController">
           <h3>Adding a simple controller</h3>
           Name : <input type="text" data-ng-model="name" /> {{name}}
           <br/>

           <ul>
           <li data-ng-repeat="cust in customers">{{cust.name}} - {{cust.city}}</li>
           </ul>
           </div>

           <script src="scripts/angular.min.js"></script>

           <script>
           function SimpleController($scope) {
                 $scope.customers=[
                                  { name:'Mayank', city:'bhopal'},
                                  { name:'Ankit', city:'bhopal'},
                                  { name:'kapil', city:'sagar'},
                                  { name:'moongoo', city:'pune'}
                                  ];
                                  }
           </script>
       </body>
       </html>
user3315505
  • 23
  • 1
  • 6

0 Answers0