Im trying to show a new question from a quiz within a modal when the next button is clicked. I havent used angular 2 before and so im sure im missing a few trivial parts. i know that questions are accessible from the html as i have displayed them in other ways but i cant get them to show in a modal one by one.
html:
<div id="modal" class="modal modal-fixed-footer" materialize="modal" [materializeActions]="actions">
<div class="modal-content">
<div *ngIf="let question of questions[pager.index];">
<div class="badge badge-info">Question {{pager.index + 1}} of {{questions.length}}.</div>
<p>{{pager.index + 1}}. <span [innerHTML]="question.text"></span></p>
<div class="row text-left answers">
<div class="col-md-6" *ngFor="let answer of question.answers">
<div class="answer">
<label class="">
<input type="checkbox" (change)="onSelect(answer.text);"/>
{{answer.text}}
</label>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-primary" (click)="goTo(pager.index + 1);">Next</button>
</div>
</div>
Any help would be great. Thanks