Hi,
I am a beginner with AngularJS and am doing a tutorial. This example is
from the tutorial. Could someone please check and advise what the problem
is. The ng-repeat does not seem to work and all I see in the browser is the
table headings.
Here is the code.
<!DOCTYPE html>
<html ng-app>
<head>
<title>Iterating through data</title>
<script src="angular.min.js"></script>
</head>
<body ng-init="customers[{joined: '2000-12-02', name:'John',
city:'Sacramento', orderTotal:7.554},
{joined: '2012-12-07', name:'Tom', city:'Chandler', orderTotal:110.57},
{joined: '1997-05-02', name:'Matt', city:'Michigan', orderTotal:19.993},
{joined: '2001-10-08', name:'Jane', city:'New York', orderTotal:112.954}
]">
<h2>Customers</h2>
<table>
<tr>
<th>Name</th>
<th>City</th>
<th>Order Total</th>
<th>Joined</th>
</tr>
<tr ng-repeat="cust in customers">
<td>{{cust.name}}</td>
<td>{{cust.city}}</td>
<td>{{cust.orderTotal}}</td>
<td>{{cust.joined}}</td>
</tr>
</table>
</body>
</html>
Thanks in advance.
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.