<ion-slides>
    <ion-slide #slides *ngFor="let question of pollQuestions">
        <section class="question-card">
            <header class="question">
                {{ question.text }}
            </header>
    
            <ul class="options" [ngClass]="{'show-votes' : question.selectedAnswer !== null }">
                <li *ngFor="let option of question.options; let i = index"
                [ngClass]="{'active' : question.selectedAnswer === i }"
                (click)="question.selectedAnswer = i">
                    <span class="progress"
                    [ngStyle]="{ 'width.%' : (question.selectedAnswer !== null ? ((option.pollUserCount * 100) / question.maxUserCount) : 0 ) }"></span>
                    <label> {{ option.text }} </label>
                    <p> {{ option.pollUserCount }} votes </p>
                </li>
            </ul>
        </section>
    </ion-slide>
</ion-slides>


<!-- <button class="next-button" (click)="nextQuestion()" *ngIf="showNext">
    <span class="text"> Next </span>

    <span class="dot"></span>
</button> -->