问题描述
我正在使用星状复选框https://akveo.github.io/nebular/docs/components/checkbox/overview#nbcheckboxcomponent,我正在尝试创建测验应用,这是我的代码
<form [formGroup]="quizAnswer" class="step-container">
<nb-stepper #stepper disableStepNavigation>
<nb-step label="First step" *ngFor="let question of quizDetail?.questions">
<p style="font-size: 20px;"><b>{{question.name}}</b></p>
<div style="padding: 10px;background: rgba(92,143,255,0.274);margin-bottom: 5px;border-radius: 5px;"
[ngClass]="{'selected': checked == true}"
*ngFor="let option of question.options; let i = index">
<nb-checkBox status="basic" formControlName="answer" [value]="option.isAnswer">
{{option.name}} {{ checked }}
</nb-checkBox>
</div>
<button style="margin-top: 20px;" nbButton nbStepperNext>next</button>
</nb-step>
<nb-step>
<div class="step-container">
<h3>Quiz completed!</h3>
<button nbButton (click)="submit()">Submit</button>
</div>
</nb-step>
</nb-stepper>
</form>
我如何获得所有回复?
例如,我为此https://stackblitz.com/edit/nested-form-array-example-wgk1cx
创建了仓库解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)