The blogs()
method needs to return the promise...
blogs: function() {
return Blogs.getList("blogs").then(function(blogs) {
return blogs;
}, function(error) {
console.log(error);
});
}
And then assign the result to the scope property when the promise is resolved...
$scope.getBlogs = function() {
Authenticate.blogs().then(function (blogs) {
$scope.blogs = blogs;
});
};