Creating an Angular factory from custom database table

Guess I should have read the error page more carefully, because it contained the answer in plain English. In the factory request is should simply match the request to the response signature (an array in my case), thus becoming:

angular.module("app").controller("MainController", ["$scope", "commentRepository", function ($scope, commentRepository) {
    commentRepository.query(function(data) {
        $scope.comments = data;
    });
}]);

Instead of using the get method.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)