Hi, I have a page which has a button with a [disabled] property, as:
<button ion-button block (click)="button_clicked()" [disabled]="disable_buttons">A button</button>
After pressing it, I disable the button and open an inAppBrowser, which once is closed, modifies the [disabled] attribute to make the button enabled back again:
button_clicked(){
// disable the button
this.disable_buttons = true;
const options:InAppBrowserOptions = {
location: 'no',
hidden: 'no',
clearcache: 'yes',
clearsessioncache: 'yes',
footer:'yes',
zoom:'no'
}
const browser = this.inappbrowser.create(url, '_self', options);
browser.on('exit').subscribe(
// enable the button
(event:InAppBrowserEvent) => {this.disable_buttons = false;}
);
browser.show();
}
The problem is that, while the .on('exit')
subscription executes successfully -that is, executes the line this.disable_buttons=false;
, on the UX, the button remains as disabled.
Any hints?
Thanks