Closed laurobd closed 7 years ago
Might want to check the difference between ViewChild
and ViewChildren
.
Please keep GitHub issues for bug reports / feature requests. Better avenues for troubleshooting / questions are Stack Overflow, gitter, mailing list, etc.
@willshowell I opened this issue because this problem I'm reporting looks like a bug. I can be wrong, but I had problems using ViewChild and ViewChildren as you are saying.
Can you recreate in a plunker? http://plnkr.co/edit/o077B6uEiiIgkC0S06dd?p=preview
Because you're using ViewChild, mdBT
is only ever going to be a reference to the first element matching MdButtonToggle
.
@willshowell, thanks for your help. It worked using ViewChildren. Sorry for the opened issue, you were right.
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.
Bug, feature request, or proposal:
When I use the md-button-toggle-group MULTIPLE and I ask for the checked property, I just give me true for the first button item.
What is the expected behavior?
Give true for each button selected separetly
What is the current behavior?
Gives me true just for the first item
What are the steps to reproduce?
What is the use-case or motivation for changing an existing behavior?
I need to know if a button was checked or not
Which versions of Angular, Material, OS, browsers are affected?
@angular/core@2.4.9 @angular/material@2.0.0-beta Windows 10 Chrome
Is there anything else we should know?