I'm trying to make an HTTP GET to an API and I'm not getting anything back in the console log, so I'm assuming this function isn't running.
This is the jsfiddle I'm trying to recreate in my Angular app, which has the proper data structure:
http://jsfiddle.net/bgoldste/keam6q9o/
Here's controller.js
.controller('GamesCtrl', function($scope, $http) {
function GamesCtrl($scope, $http) {
console.log("did this run");
$http(
{
method: 'GET',
url: 'https://www.kimonolabs.com/api/bzq274q4?apikey=JfagXh7xfxWsnWGzLAKpBIrTFwENcGY6',
headers: {
'authorization': 'Bearer xOZHZE4sit0Pe6VGqsOQn5jKPpA5QpG3'
}
}).
success(function (data) {
$scope.data = data['results']['collection1'];
});
}
})
And here's games.html
<ion-view title="Games" ngcontroller="GamesCtrl">
<ion-content>
<ion-list>
<ion-item ng-repeat="row in data">
{{row['property1']['src']}}
</ion-item>
</ion-list>
</ion-content>
</ion-view>
I'm not even seeing a network request in the console from that GET