Is there a way to connect the checked property of a radio button to a boolean variable in a Component class? I would like the radio button in the template to be pre-selected if the boolean flag is true.
I attempted to use
<input type="radio" [(ngModel)]="isSelected()">
but it resulted in a template syntax error.
platform-browser.umd.js:962EXCEPTION: Error: Uncaught (in promise): Template parse errors:
Parser Error: Unexpected token '=' at column 13 in [isSelected()=$event] in ChoiceComponent@5:6 ("
(change)="select()"
required
[ERROR ->][(ngModel)]="isSelected()"> {{choice.text}}</label>
</div>
"): ChoiceComponent@5:6