One of the challenges I am facing involves dealing with the md-checkbox
element :
<md-checkbox (change)="showPaidOrders($event)">
<span class="show-orders-label">{{'paid' | translate}}</span>
</md-checkbox>
Here is its implementation in TS
:
showPaidOrders(event) {
if (event.target.checked) {
return true;
}
}
I encountered an issue that resulted in the following error:
cannot read property 'checked' of undefined
Interestingly, this works perfectly fine with a standard input
element when using the checkbox
type. Is there perhaps an alternative method to consistently check the status of the md-checkbox
(on every click)?