I am currently facing a challenge in extracting data from an external domain using angularjs. Despite no issues showing up in the console, I have made several attempts and even created a fiddle. Any guidance or help would be much appreciated.
View Code
<div ng-controller="myCtrl">{{response}}
<button ng-click="getData()">GET Request</button>
</div>
Controller code
angular.module('myApp', [])
.controller('myCtrl', function ($scope, $http) {
$scope.getData = function () {
$http.get("http://api.openweathermap.org/data/2.5/weather?zip=98007,us").success(function (response) {
$scope.myData = response;
console.log(response)
});
};
});