components icon indicating copy to clipboard operation
components copied to clipboard

[md-radio-group] The value two-way binding not working?

Open csabattilas opened this issue 10 years ago • 2 comments

Bug, feature request, or proposal:

Bug [x]

What is the expected behavior?

According to the readme.md of the radio, there is value property on the group with two way binding. If I set a variable with one of the possible value selections of the radios inside the group, then the radio which value attribute matches the variable's value will be selected. But if I select another radio the variable's value will not get updated. I guess the cause of this behaviour is that there is no valueChange EventEmitter created in the MdRadioGroup class

The variable's value should updated when new radio is selected

What is the current behavior?

The variable's value is not updating when new radio is selected

What are the steps to reproduce?

Providing a Plunker (or similar) is the best way to get the team to see your issue. Plunker template: http://plnkr.co/edit/8aHnV0luO8Oie2kwQqek?p=preview

What is the use-case or motivation for changing an existing behavior?

There is the change event which has the value property so that might be enough, but then the readme.md file should be updated.

Which versions of Angular, Material, OS, browsers are affected?

2.0.0 2.0.0-alpha.9-3 Mac os X crhome

Is there anything else we should know?

not too much experience with Angular 2

csabattilas avatar Nov 09 '16 20:11 csabattilas

The docs are just wrong here- it should be using ngModel there.

jelbourn avatar Nov 10 '16 03:11 jelbourn

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.