The following tutorial points to an external json file. But it is blocked by CORS policy. How can I declare the object locally in order to populate the web table? Codepen: https://codepen.io/centem/pen/Rwbmmdy Thank you.
var app = angular.module('myApp', []);
app.controller('myController',
function ($scope, $http) {
var request = {
method: 'get',
url: 'https://www.encodedna.com/angularjs/tutorial/birds.json',
dataType: 'json',
contentType: "application/json"
};
$scope.arrBirds = new Array;
$http(request)
.success(function (jsonData) {
$scope.arrBirds = jsonData;
$scope.list = $scope.arrBirds;
})
.error(function () {
});
});