1 Reply Latest reply on May 30, 2017 9:31 AM by shotts@adobe

    How to enable/disable button in setInterval function in PhoneGap




      I am not sure if this is really an Ionic question, but here we go.


      What I expect: in the record function, the button is disabled after clicking on it, and enabled after the condition is triggered in an inner setInterval function.


      Problem: value assigned to buttonDisabled in setInterval function does not enable the button again.


      in html, I have a button


      <button ion-button icon-only (click)="record()" [disabled]="buttonDisabled"><ion-icon name="recording"></ion-icon></button>