I am trying to return the JSON data from the specified URL but when the alert pops up it just shows [object Object]. I intend that the date appears in the calendar but only on the day you enter the json and not on all days.. How do I do this?
My calendar
Here is an example of the JSON.
{
"title": "example glossary",
"start": "2016-10-22",
"allDay": false
}
controller
$scope.setDayContent = function(date) {
return $http ({
method : "GET",
url : "app/components/home/controller/test_calendar.json"
}).then(function mySucces(response) {
return response.data;
}, function myError(response) {
$scope.valor = response.statusText;
});
};
If i put it like this, it works fine <p>A data {{valor.start}}</p> but what I want is to appear on the calendar and then the error appears [object Object].

console.log(response);to see the object. An alert cannot parse an object literal to string.response.data.start