3xラジオボタンをフィルタ機能として選択する必要があるアプリケーションがあります。Angular4:ネストされたngループのラジオボタン - クリックするとすべてのオプションが選択されます
これは私のhtmlです:
<div class="dropdown" *ngFor="let type of filterTypes">
<button type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{type}}</button>
<div class="dropdown-menu byrd-shade" aria-labelledby="dropdownMenuButton">
<div class="radio-group">
<div class="checkbox-forms gay-flame-forms form-group radio">
<label class="form-check-label">
<div *ngFor="let media of filterMedia">
<input *ngIf="filterMedia"
class="form-check-input"
type="radio"
name="filterMedia"
value="1">
<i aria-hidden="true" class="fa fa-circle"></i>{{media}}
</div>
</label>
</div>
</div>
</div>
TS:
filterTypes: any = ['Media type', 'License type', 'Verification'];
filterMedia: any = ['All', 'Images', 'Videos'];
filterLicense: any = ['All, Exclusive, Non-exclusive'];
filterVerification: any = ['All', 'Verified', 'Non-verified'];
出力:
私は、これは間違って近づいているだろうか?私は、ラジオボタンを単独で(?)アクティブにする必要があります。
たぶん私は明らかに問題を理解していないよ、私はこのplunkをcretedて、それは罰金[plunker]を働いている(https://plnkr.co/edit/AYYyB8U3ntmQ14D8oYo1?p=preview) – JayDeeEss