Skip to main content

useAnswer

This page describes the zoovuFacade of @zoovu/exd-api 0.x, a legacy library. New projects start from application themes.

useAnswer to get answer properties by answer id

@Component()
export default class ExampleComponent extends Mixins(ZoovuFacadeMixin) {

get answerText(): string {
const question = this.zoovuFacade.firstQuestionFromCurrentPage();
const answerId = question.answerIds[0] ?? "";
const answer = this.zoovuFacade.useAnswer(answerId);

return answer.text;
}
}