google / material-design-lite

Material Design Components in HTML/CSS/JS
https://getmdl.io
Apache License 2.0
32.28k stars 5.05k forks source link

Radio button view does not reflect model changes within Angular #2021

Closed pmerle closed 8 years ago

pmerle commented 8 years ago

Hi,

I am using V. 1.0.6 of MDL and no-matter what I try, I cannot get the radio button of type mdl-js-radio reflect model changes. When I remove the mdl-js-radio attribute, thus keeping only mdl-radio class in the surrounding label, it works 2-way.

With mdl-js-radio it is only 1-way i.e. clicking the radio buttons is reflected in view and model, but model changes from a location watch don't get visualized.

With a text input everything works fine, too. It's just the radio buttons.

On load and initialization of the page button view is reflected properly. Later updates from the location watch (triggered e.g. by using the Back button in the browser) don't get visible.

Any idea?

Cheers Pascal

dbapl commented 8 years ago

The same is happening in KnockoutJS.

surma commented 8 years ago

The GitHub issue tracker is for issues, bugs and feature requests with MDL. MDL is targeted at static content sites and integration with any kind of framework is not a first-class use case for us. But, if you need help with these kind of things, please head over to StackOverflow and use the material-design-lite tag. From what I know, similar things have been covered a few times on there and there’s people who do know how to make it work :)

pmerle commented 8 years ago

I've now successfully used the bootstrap radio buttons.