I am currently working with a checkbox element in my code:
<md-checkbox checked.bind="addEventCommand.allDay" change.delegate="allday()">All Day</md-checkbox>
When the above checkbox is true, I want to disable the following div:
<div class="row" >
<md-input label="Start DateTime" value.bind="addEventCommand.startTime" ></md-input>
<md-input label="End DateTime" value.bind="addEventCommand.endTime"></md-input>
</div>
Typically, in JavaScript, I would simply get the element and disable it. However, in Angular Materialize and TypeScript, I am unsure of how to accomplish this.
In my TypeScript file, I have added the following function:
allday() {
if (this.addEventCommand.allDay === true) {
}
}
I attempted to use a reference on the checkbox like so:
<md-checkbox ref="addEventCommand.allDay.check"checked.bind="addEventCommand.allDay" >All Day</md-checkbox>
And on the targeted div, I tried the following disabled binding:
<div class="row" disabled.bind="addEventCommand.allDay.check.checked"></div>
Unfortunately, these attempts did not produce the desired effect.