#!/bin/bash
sleep .5
while [1]
do
omxplayer -b -r -live http://192.168.1.16:3000/fileserver/channelA
done
&在按下标有 确认 的按钮后触发student_obj_answer_id
。
问题:
*ngIf="is_answered == true"
不会像*ngIf="student_obj_answer_id==answer.cmp_qst_ans_sngl_id"
预期产出:
*ngFor
可以比较*ngIf="student_obj_answer_id==answer.cmp_qst_ans_sngl_id"
我目前的代码:
*ngFor
在控制器中: -
<div *ngIf="component.details.qst_main.question_type == QST_FORMAT.SINGLE_ANSWER">
<div class="answers">
<ng-container *ngFor="let answer of component.details.qst_main.answers">
<div [ngClass]="{'selected':userAnswerObjectiveSelected==answer.cmp_qst_ans_sngl_id,'avoid-clicks':avoid_clicks}"
(click)="getUserObjectiveAnswer(answer,answer.cmp_qst_ans_sngl_id)" class="answer-list">
<div [innerHTML]="answer.answer_text"></div>
<div class="answer-check-sign" *ngIf="is_answered == true">
<div *ngIf="student_obj_answer_id==answer.cmp_qst_ans_sngl_id">
<div *ngIf="answer.is_correct_answer==1">
<img [src]="'assets/imgs/question/correct.svg'"/>
</div>
<div *ngIf="answer.is_correct_answer==0">
<img [src]="'assets/imgs/question/wrong.svg'"/>
</div>
</div>
<div *ngIf="student_obj_answer_id!=answer.cmp_qst_ans_sngl_id">
<div *ngIf="answer.is_correct_answer==1">
<img [src]="'assets/imgs/question/correct.svg'"/>
</div>
</div>
</div>
</div>
</ng-container>
</div>
</div>