I have service
angular.module('myapp')
.service('AnswerService', function() {
var answers = [];
this.addAnswers = function(questionId) {
answers.push(questionId);
console.log(answers);
}
return this;
})
and have to retrieve the value of answers in controller and display it in html.
should I use return this or return answers?
addAnswerfunctionality, or not?