inAppBrowser listener

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:


// disable the button
      this.disable_buttons = true;

      const options:InAppBrowserOptions = {
        location: 'no',
        hidden: 'no',
        clearcache: 'yes',
        clearsessioncache: 'yes',

    const browser = this.inappbrowser.create(url, '_self', options);

// enable the button
        (event:InAppBrowserEvent) => {this.disable_buttons = false;}

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?


Try to run this code inside ngZone

constructor(private ngZone: NgZone) {}
  // enable the button
  (event:InAppBrowserEvent) => { => {
    this.disable_buttons = false;

I will check it out.

Following your answer on ngZones, I reached this discussion:

There’s an alternative to ngZone manipulation in this SO thread, by manually launching the change detector (adding it here also for future reference):