Я пытаюсь провести тест, и у меня есть база данных, заполненная вопросами, которые я пытаюсь отобразить в веб-интерфейсе. Я могу отобразить идентификатор вопросов, но не фактические вопросы. Это код машинописного текста:
if(this.questionNumber !== this.questions.length - 1){
this.questionNumber++;
this.selectedQuestion = this.questions[this.questionNumber]
console.log(this.selectedQuestion.payload.doc.id)
this.questionAt++;
}
else{
console.log("cant increase on selected array");
}
}
previous(){
if(this.questionNumber !== 0){
this.questionNumber--;
this.selectedQuestion = this.questions[this.questionNumber]
console.log(this.selectedQuestion.payload.doc.id)
this.questionAt--;
}
else{
console.log("cant select -1 from an array");
}
}
И я пытаюсь отобразить его вместо идентификатора в следующем коде:
<div class="modal-header">
<h3><span class="label label-warning" id="qid">{{questionAt}}/10</span> {{this.selectedQuestion.payload.doc.id}}</h3>
</div>