I am starting to use angular js. It was great, although I got into this problem trying to request public flickr photos using their json api. Here is the url .
If you go there, you will see json's answer just fine. Although, when I try to print the results in a template using {{flickrResult}}, I get {} printed, and when I check the console for errors, I get "jsonFlickrFeed not defined", which is part of the json that flickr provides.
Here is the code of my controller:
angular.module('Flickr', ['ngResource']); function FlickrCtrl($scope, $resource){ $scope.flickr = $resource('http://api.flickr.com/services/feeds/:action', {action:'photos_public.gne', format: 'json', callback: 'JSON_CALLBACK'}, {get: {method: 'JSONP'}}); $scope.flickrResult = $scope.flickr.get(); };
Any ideas how I can get around this?
source share