-
Notifications
You must be signed in to change notification settings - Fork 3.4k
bug(md-checkbox): ngChecked directive not working #535
Comments
You need to have an ng-model attribute alongside the ng-checked attribute On Tue, Nov 4, 2014 at 12:30 AM, breandr notifications@github.com wrote:
|
It works on a standard checkbox fine without an ng-model though. |
You're going to need to provide more detail to troubleshoot this issue. On Tue, Nov 4, 2014 at 10:18 PM, breandr notifications@github.com wrote:
|
It was supposed to read "standard checkbox" but I put the html element, so it just skipped it. I edited but you mustn't have received an email with the update. http://plnkr.co/edit/KldWCcKJXqQxIKwFQeki?p=preview |
The problem is you're not using ng-model, if you want the checkbox to Here's a plunker based off yours On Wed, Nov 5, 2014 at 1:22 PM, breandr notifications@github.com wrote:
|
Right, but my point is that ng-checked works for standard checkboxes but not md-checkbox. If you look at my original plunkr you will see the standard checkbox does not use ng-model but is still checked because ng-checked is truthy. My use case is I have a checklist directive, and the first checkbox in the checklist is a special "All" checkbox. Checking this unchecks all checked checkboxes, and by checking one again I want the "All" checkbox to be unchecked.
Sure, I can make this work by using ng-model, but I'd rather not. And since it works with a standard checkbox, this is either a bug with md-checkbox or a documentation issue. |
md-checkbox doesn't support checked. If you feel it's necessary you can On Wed, Nov 5, 2014 at 9:32 PM, breandr notifications@github.com wrote:
|
👍 |
How to use md-checkbox to select an entire row when used inside a grid |
+1, This is a real big issue. It's a regression from angularJS. |
+1 |
1 similar comment
+1 |
@Elfayer - are you saying that this issue has not been fixed with the latest codebase in |
According to the doc:
But I am unable to get ngChecked working.
The text was updated successfully, but these errors were encountered: