AngularJS has an alternative to $http , you can find it here . For instance:
$http({method: 'JSONP', url: 'http://domain.com/page?json_callback=JSON_CALLBACK'}).success( function(data, status) {
Or even shorter:
$http.jsonp('http://domain.com/page?json_callback=JSON_CALLBACK').success( function(data, status) {
JSONP (JSON Padding) allows you to receive JSON data from another domain. However, the data you receive should not be just JSON, but rather a Javascript file like this:
JSON_CALLBACK([ {"name": "apple", "color": "red"}, {"name": "banana", "color": "yellow"} ]);
If your JSON data that you need comes from the same domain, you do not need JSONP.
source share