So I've created a super basic NoSQL DB in DynamoDB and used API Gateway to access the data. I created a pretty simple Get request that retrieves documents based on it's ID. Now I'm fairly new to Angular and AWS so I'm kind of in over my head right now. I've played around with different code and found a pretty basic angular example that runs a $http.get and pretty much just displays the data in a window. My problem is that when I run this angular code with any other API endpoint it works great. However, when I run this code against my API Gateway endpoint nothing pulls through. I've tried adding a content-type header but that still doesn't get me anything. Pretty stuck and any help would be appreciated. I'm sure it's something obvious I missed on the API Gateway/my rest call but anything help would be great! Thanks in advance!
<!DOCTYPE html>
<html>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<body>
<div ng-app="myApp" ng-controller="myCtrl">
<h1>{{myWelcome}}</h1>
</div>
<script>
var app = angular.module('myApp', []);
app.controller('myCtrl', function($scope, $http) {
$http.get("https://xyz.execute-api.us-west-2.amazonaws.com/dev/idex/0001")
.then(function(response) {
$scope.myWelcome = response.data;
});
});
</script>
</body>
</html>
Obviously the json should show up through the H1 tags but nothing is coming through. Also, I've changed my endpoint url for security.