Tell me, where is the dog buried?
There is such an example of calling $ http.get on Angular.
HTML:
<body ng-app="httptest"> <div ng-controller="getjson"> <pre> <div>{{data}}</div> </pre> </div> </body> Js
var app = angular.module("httptest", []); app.controller("getjson", ["$scope", "$http", function($scope, $http) { $http.get("http://codepen.io/anon/pen/LVEwdw.js"). success(function(res) { $scope.data = res; }); }]); ( http://codepen.io/stoxa/pen/pyORVj?editors=1111 )
with the link http://codepen.io/anon/pen/LVEwdw.js ,
returning jsoninu -
[{"nama":"Maria Belen","alamat":"Spanyol","pictures":["small.png","medium.png","big.png"]},{"nama":"Betty La Fea","alamat":"Spanyol","pictures":["small.png","medium.png","big.png"]}] - Работает with the link http://www.mocky.io/v2/571e719c0f00008e1b127cce , returning the same jsonin - does not work ..
I tried and inserted content-type into headers. The result is the same(