I'm doing some testing with an API in apiary.io and I wanted to call some data from it with Angular, but it doesn't seem to call correctly. It should be pretty simple, so I'm not sure whats wrong:
HTML:
<span><a href="network-updates.html">{{user.text}}</a></span>
JS:
var MainController = function($scope, $http){
var usercomplete = function(response){
$scope.user = response.data;
};
$http.get("http://private-abc123-.apiary-mock.com/bus")
.then(usercomplete);
};
JSON:
{
"Header" : "heading",
"text" : "hello"
}
angular.fromJson(response)