Ion toggle issue

i got an issue with ion toggle.
i just want, if a validation is false, so toggle get back to false, until validation is true.
here is my code
.html

.ts
image

i don’t know if im doing an stupid question or what. :frowning:

Try change (ngModelChange)=“toggleClick()”

(ionChange)="toggleClick()"

(ionChange) enters in a infinite loop :frowning:

Just let the ng model and make the validation in other funtion, probably the function that returns your api response.

solved:

image

adding the attribute checked and changing it on .ts , it work :wink: