You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
pvamshi
changed the title
md-checkbox input not true when modal value is true
md-checkbox input not true when modal value is true when component loads
Nov 27, 2016
jelbourn
changed the title
md-checkbox input not true when modal value is true when component loads
When MdCheckbox is initialized to true, the internal native checkbox has checked == false
Nov 30, 2016
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 getstrue
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 environmentWhat 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
The text was updated successfully, but these errors were encountered: