I'm a novice attempting to use Angular JS to read Kickstarter json data and display it on a page.
I have a code pen showing the basic code I'm using with a working sample data source, and then a not working example with the kick-starter source.
http://codepen.io/anon/pen/KmCsc
HTML
<div ng-app>
<div ng-controller="recent">
<p>First Project ID: {{kickstarter.projects[0].id}}</p>
<p>Total hits: {{kickstarter.total_hits}}</p>
</div>
</div>
Javascript
function recent($scope, $http) {
$http.get('https://www.kickstarter.com/discover/recently-launched?format=json').
success(function(data) {
$scope.kickstarter = data;
});
}
I might be making a mistake in how I reference the variable, I've been banging my head against a wall for several hours and can't see it. Your expertise is greatly appreciated.
For reference Kickstarter recent project data is available in json format here: https://www.kickstarter.com/discover/recently-launched?format=json
Thanks in advance for your help.