Newer
Older
<ion-header>
<ion-navbar>
<ion-title>你问我答</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
<div class="learn-item">
<div class="item-container">
<div class="item-title">
<p>
<span *ngIf="item?.type == 1">(判断)</span>
<span *ngIf="item?.type == 2">(单选)</span>
<span *ngIf="item?.type == 3">(多选)</span>
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{{item?.stem}}
</p>
</div>
<div class="item-content">
<div class="padding-20-20">
<!--判断题-->
<ng-container *ngIf="item?.type == 1">
<p>
<label>
<input [(ngModel)]="answer" [name]="item?.id" value="A" type="radio">
<span class=" selectIndex">A</span>
是
</label>
</p>
<p>
<label>
<input [(ngModel)]="answer" [name]="item?.id" value="B" type="radio">
<span class=" selectIndex">B</span>
否
</label>
</p>
</ng-container>
<!--单选题-->
<ng-container *ngIf="item?.type == 2">
<ng-container *ngFor=" let option1 of item?.options;">
<p>
<label>
<input [(ngModel)]="answer" type="radio" [value]="option1.option"
[name]="item?.id">
<span class="selectIndex">{{option1.option}}</span>
{{option1.comment}}
</label>
</p>
</ng-container>
</ng-container>
<!--多选题-->
<ng-container *ngIf="item?.type == 3">
<ng-container *ngFor=" let option2 of item.options;let i2 = index;">
<p>
<label>
<input type="checkbox" (change)="mutiSelect(i2,option2.option)"
[value]="option2.option" [name]="item?.id">
<span class="input-duox selectIndex">{{option2.option}}</span>
{{option2.comment}}
</label>
</p>
</ng-container>
</ng-container>
<!--问答-->
<ng-container *ngIf="item?.type == 4">
<textarea [(ngModel)]="answer" class="content-textarea"></textarea>
</ng-container>
<button class="submit-btn submit" tappable (click)="submit()">确认</button>