-
Notifications
You must be signed in to change notification settings - Fork 258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Button Toggle component #343
Comments
I noticed this feature request and I’m interested in working on it. I believe it would greatly benefit the project and I'm excited to contribute. |
Sure. Feel free to give it a try. This component I believe should be most similar to the radio button component. So it's a good starter task. Some helpful documentation to start:
We also recently set up a . You can also use Right now, we don't have any instructions for using these two approaches yet. And I would say it's "experimental" in that we haven't tested these environments out much yet. But if you want to give help us test these dev environments out, that would be great too. Probably some kinks to work out with the dev flow. |
Thank you very much for your guidelines. I am working on it |
I have a question. I Read the documentation about building components with the scaffolding script. I did it but when i import the MatButtonToggleModule on the ButtonToggleComponent it shows on the web ui infinite loading. Could you please help me? thanks in advance
JavaScript Error: The directive '_MatButtonToggleGroup' needs to be compiled using the JIT compiler, but '@angular/compiler' is not available. |
The issue sound familiar. My random guess is that you'll need to import the module. Here's an example from table component. You'll see the first line we needed to import the MatTableModule. Maybe you need to do something similar. But maybe you already did that and didn't show that snippet.
Can you also post a link to your branch on your fork? In case that does not solve the problem, I can take a look at the code more closely. |
Thanks for your response. Yes i have import it. The following code is the whole .ts file
My branch on my fork: feature/create-component-button_toggle |
Thanks. I'll take a look later. |
I took a look and haven't been able to figure out the reason why it's not able to import the MatButtonToggleModule. I'll keep looking when I get the chance. |
@CelaniDe I think it's because button toggle isn't listed in packages.bzl - you'll need to add it in two spots, similar to what @richard-to did in an earlier change for table (b59f6b9#diff-5ef0ea9ea291d74d4ad4ad321d0aea5488a66ea0560aff9eb210911b6809bbe2). This is unfortunately due to the way we compile angular material components with Bazel and it's quite confusing. |
https://material.angular.io/components/button-toggle/overview
The text was updated successfully, but these errors were encountered: