问题
I have a mat-checkbox in the angular project. How to make a mat-checkbox can only be selected one. (No more than one). Here's the code I have:
<mat-checkbox>Pre Order</mat-checkbox>
<mat-checkbox>Order</mat-checkbox>
Can anyone help? I want the mat-checkbox to behave like a mat-radio-button.
回答1:
Just to get the correct answer:
- Use the mat-radio-button
- Set
border-radius: 0%;
for.mat-radio-outer-circle
css class
And that's it!
Cheers!
来源:https://stackoverflow.com/questions/60143309/how-to-make-mat-checkbox-like-a-radio-button