Why won't the [(ngModel)] radio group be attached?

I use ng-bootstrap ngbRadioGroupas follows:

<div>
  <label>Deductible:</label>
  <div class="radio-group" [(ngModel)]="transaction.isDeductible" ngbRadioGroup name="isDeductible">
    <label class="btn btn-secondary"><input type="radio" [value]="true">Yes</label>
    <label class="btn btn-secondary"><input type="radio" [value]="false">No</label>
  </div>
</div>

Unfortunately, selecting one of the parameters does not set the property transaction.isDeductible.

What could be the problem?

Thanks in advance for any ideas, let me know if I can provide additional relevant information :)

EDIT:

Do not do anything with two other RadioGroups, I suggested the easiest one here

+4
source share
2 answers

../node_modules/bootstrap/dist/js/bootstrap.js angular-cli.json . , , Bootstrap JavaScript!

, ng-bootstrap JavaScript-. , , , - ? , .

+1

, , , , , , FormsModule name .

as-is Plunkr , , , , - , , , .

http://plnkr.co/edit/vHeyjHiHjawMLNiNXXk3?p=preview

0

Source: https://habr.com/ru/post/1664098/


All Articles