There are older posts on this topic, but there is a new wrinkle on it. As discussed extensively on the Web, and in this resolved issue https://github.com/angular/angular/issues/11271 , we’re not supposed to use disabled=“true” as shown in the documentation for ion-toggle when it is a form control. So I disabled the form control in the recommended way, fc.myToggle.disable(). This sets the formControl.disabled flag to true, but it doesn’t disable the ion-toggle. So is there a way to disable the ion-toggle without triggering the ugly warning? This is the ugly warning that shows up in the console:
It looks like you're using the disabled attribute with a reactive form directive. If you set disabled to true
when you set up this control in your component class, the disabled attribute will actually be set in the DOM for
you. We recommend using this approach to avoid 'changed after checked' errors.
Example:
form = new FormGroup({
first: new FormControl({value: 'Nancy', disabled: true}, Validators.required),
last: new FormControl('Drew', Validators.required)
});