Ng-repeat not rendering content
I'm having problems with ng-repeat rendering the correct number of
elements, but without any content in. I broke the ng-repeat down into a
smaller example and it's still not rendering.
http://plnkr.co/edit/USJJLQU8cZZ0IreBAbjj?p=preview
<html ng-app>
<head>
<script data-require="angular.js@*" data-semver="1.2.0-rc2"
src="http://code.angularjs.org/1.2.0-rc.2/angular.js"></script>
<style>
.track {
border:solid 1px red;
}
</style>
<script>
var Results = function($scope) {
$scope.tracks = [
{"uri":"spotify:track:1jdNcAD8Ir58RlsdGjJJdx","name":"Ho
Hey","artist":"The Lumineers","album":"The Lumineers"},
{"uri":"spotify:track:3uuGbRzMsDI5RiKWKOjqWL","name":"Hey
Porsche","artist":"Nelly","album":"Hey Porsche"},
{"uri":"spotify:track:5BSndweF91KDqyxANsZcQH","name":"Ho
Hey","artist":"The Lumineers","album":"The Lumineers"},
{"uri":"spotify:track:2UNc0duOP4cS7gqYFFkwxT","name":"Hey
Girl","artist":"Billy Currington","album":"Hey Girl"},
{"uri":"spotify:track:6fgbQt13JlpN59PytgTMsA","name":"Snow [Hey
Oh]","artist":"Red Hot Chili Peppers","album":"Snow [Hey Oh]"}
];
});
</script>
</head>
<body ng-controller="Results">
<h3>Tracks</h3>
<div ng-repeat="track in tracks">
Track URI:
{{track.uri}}
</div>
</body>
</html>
What's wrong? Almost certainly doing something stupid here, but I can't
tell what it is.
No comments:
Post a Comment