function _getTagObject() {
return $http.get('http://localhost:8081/tag?limit=1').then(
function(response) {
response.data[0];
});
};
I'm trying to only return response.data[0].
function _getTagObject() {
return $http.get('http://localhost:8081/tag?limit=1').then(
function(response) {
response.data[0];
});
};
I'm trying to only return response.data[0].
You're very close. You just need to return response.data[0] from the then success callback:
function _getTagObject() {
return $http.get('http://localhost:8081/tag?limit=1').then(function(response) {
return response.data[0];
});
};