-
Notifications
You must be signed in to change notification settings - Fork 6.8k
docs(material/slide-toggle): update changes from legacy #25825
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
Conversation
|
||
<mat-slide-toggle name="slideToggle" required ngModel> | ||
<mat-slide-toggle name="slideToggle" ngModel="[(formToggle)]"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't look right.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what doesn't look right about it? required
attribute doesn't work, since this is a button role="switch"
. I also added the binding to formToggle
, so that it can alert the value of the toggle when submitting the form.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The syntax on the ngModel
binding is wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ohh, that's not the right syntax 🤦 🍌 📦. I corrected the syntax, thanks.
Update migration guide for MDC Slide Toggle to give more detail on form validation. Remove form validation from slide-toggle example as it does not seem to be appropriate for switch role. Update slide toggle overview documentation to reflect changes for the MDC-based slide toggle.
e219c45
to
af30754
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Update migration guide for MDC Slide Toggle to give more detail on form validation. Remove form validation from slide-toggle example as it does not seem to be appropriate for switch role. Update slide toggle overview documentation to reflect changes for the MDC-based slide toggle. (cherry picked from commit 7456712)
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Update migration guide for MDC Slide Toggle to give more detail on form validation. Remove form validation from slide-toggle example as it does not seem to be appropriate for switch role. Update slide toggle overview documentation to reflect changes for the MDC-based slide toggle.