Trying to retrieve JSON data from the address , which is generated using the Flickr API with the following Angular code:
angular.module('myapp', ['ngResource']).
controller('MyController', ['$scope', '$resource', function ($scope,$resource) {
$scope.photoAPI = $resource("http://www.soe.gr/photos.txt",
{ callback: "JSON_CALLBACK" }, { get: { method: "JSONP" }});
$scope.photos=$scope.photoAPI.get();
}]);
Using $resource
to avoid being blocked when retrieving data from another domain, but encountering the error:
Uncaught ReferenceError: jsonFlickrFeed is not defined
.
- First question: What kind of typing is this -
jsonFlickrFeed({...})
? - Second question: How can I access the items property of the JSON object in my $scope for manipulation and continuing with my code as I am currently stuck? Thank you.