Skip to content

Instantly share code, notes, and snippets.

@arantius
Created February 16, 2011 17:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arantius/829758 to your computer and use it in GitHub Desktop.
Save arantius/829758 to your computer and use it in GitHub Desktop.
<!doctype html>
<html xmlns:ng="http://angularjs.org">
<head>
<title>Angular Title Test</title>
<script src="http://code.angularjs.org/angular-0.9.10.min.js" ng:autobind></script>
<script type="text/javascript">
function LoadingController($resource) {
this.data = $resource('data.json').get();
}
LoadingController.$inject = ['$resource'];
</script>
</head>
<body ng:controller="LoadingController">
<p>A list of the returned items. Should be two items in the list.</p>
<ul>
<li ng:repeat="datum in data"><pre>{{datum}}</pre></li>
</ul>
</body>
</html>
{
"01" : {
"id" : "01",
"value" : "a"
},
"02" : {
"id" : "02",
"value" : "b"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment