mat-radio-group data binding requires unique name
Bug, feature request, or proposal:
If a component contains mat-radio-group, and you create multiple instances of that component, the mat-radio-group names appear to collide.
What is the current behavior?
I have to ensure unique mat-radio-group names in order for data binding to work properly.
What are the steps to reproduce?
https://stackblitz.com/edit/angular-ujce61?file=app%2Ftest%2Ftest.component.html
Closing as this is working as intended. Within forms the name for a value control must be unique to prevent this collision.
@josephperrott, within a form, of course names must be unique, but in this example I have separate forms, one in each instance of the component.
I've simplified the code somewhat here: https://stackblitz.com/edit/angular-gt2qqc
See that both the material radio group and the standard html radio inputs are bound to the same property, yet the material radio group binding only works in the 3rd instance.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.