Here's my controller call to the service:
Answers.getAnswers($routeParams.questionId, function(answers) {
console.log(answers);
$scope.answers = answers;
});
Here's the service:
angular.module('intquestApp')
.factory('Answers', function ($resource) {
return {
getAnswers: function(questionId) {
$resource('api/answers?questionid=' + questionId);
}
};
});
I can confirm the resource is there for certain, and I know that the value of questionId
is accurate. Am I doing something syntactically wrong?