-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Description
Bug, feature request, or proposal:
Bug
What is the expected behavior?
When the modal value is true, the input we hide should also have the value of true
. It gets true
when we uncheck and check the checkbox manually.
What is the current behavior?
input element default value is false
What are the steps to reproduce?
https://plnkr.co/edit/SS6LBPL3ucXx1njTRGkF?p=preview
Inspect the checkbox and run this in the console :
$0.querySelector('input').checked
// assuming chrome dev environment
What is the use-case or motivation for changing an existing behavior?
Which versions of Angular, Material, OS, browsers are affected?
Angular : 2.2.1
Material: ^ 2.0.0-alpha.10
Is there anything else we should know?
This was a deal breaker while testing the code.
There is another issue , not sure worth creating another bug :
When testing the component using jasmine, the only way to check the checkbox is checked is to look for the class 'md-checkbox-checked' is present. Even this class is not present while testing so there is no way to test if the checkbox is checked when model value is true while rendering.
I could not get the spec working in plnkr, so created a project with the unit tests :
https://github.com/pvamshi/md-checkbox-test