-2
       //working
       [ngModel]="bets.amount ? bets.amount : '' "

       //not working
       [(ngModel)]="bets.amount ? bets.amount : ''"

If I use [(ngModel)] will not work. how to make it work?

qweqwe
  • 141
  • 1
  • 1
  • 7

1 Answers1

3

I think the best practice is the using of the getter and setter and you put the condition in the get or set as you want

H Mirindra
  • 94
  • 4