jquery - angular2 - bootstrap4 add class for selected custom radio button -
i got problem adding .selected
class selected custom radio button using boostrap 4. here code:
app.component.html
<div class="list-item item-owner text-center selected" [class.selected]="designation" *ngfor="let titlelist of designations; let idx = index"> <p><strong>{{titlelist.title}}</strong></p> <div class="item-icn icn-owner"></div> <p class="tx-desc"> {{titlelist.description}} </p> <input class="type-owner" type="radio" name="designationnewstaff" [value]="owner" [(ngmodel)]="owner" hidden/> </div>
app.component.ts
designations = []; this.designations = [{ value: 1, data: 'owner', title: 'owner', description: 'manage staff accounts, receive, view & void payment transactions stores', }, { value: 2, data: 'supervisor', title: 'outlet supervisor', description: 'receive, view & void payment transaction in assigned outlet', }, { value: 3, data: 'cashier', title: 'outlet cashier', description: 'receive, view & void payment transaction in assigned outlet', } ];
Comments
Post a Comment