Yeah - I have. When I use JSONP and ask to read in the
http://massachusettswebdesigns.com/states-jsonp.json file, I get *states
is not defined *error.
Here's the factory code with the JSONP use:
angular.module('locationApp').
factory("ReadJson", ['$http', function ReadJsonFactory($http)
{
return {
// GetJson - Gets a JSON based URL and returns it as an object.
getJson:function(url)
{
return $http.jsonp(url).then(function (result)
{
console.log("Result = " + result.data);
return result.data;
});
}
}
}]);
Again, stumped on this one. . .
Ryan
On Sunday, April 5, 2015 at 2:55:58 AM UTC-4, Sander Elias wrote:
>
> quick question, did you try $http.jsonp
> <https://docs.angularjs.org/api/ng/service/$http>?
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.