Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: platform events not triggering change detection #18831

Closed
mebibou opened this issue Jul 18, 2019 · 1 comment
Closed

bug: platform events not triggering change detection #18831

mebibou opened this issue Jul 18, 2019 · 1 comment
Labels
package: angular @ionic/angular package type: bug a confirmed bug report

Comments

@mebibou
Copy link

mebibou commented Jul 18, 2019

Bug Report

Ionic version:

[x] 4.x

Current behavior:
Related to #18342, I just had the same issue today, and imho this is definitely a bug related to ionic with angular, since platform comes from:

import { Platform } from '@ionic/angular';

Expected behavior:
Since platform.resume type of events come from the @ionic/angular package, I would expect them to be wrapped in a zone so that not everyone has to wrap it themselves.

Especially since platform.ready() is wrapped in a zone, I really don't see why platform.resume should not.

Steps to reproduce:
Have some view that changes when the app resumes.

Related code:

<ion-content>
  <span *ngIf="resumed">App is resumed</span>
</ion-content>

class Component {
  resumed = false;
  
  constructor(
    platform: Platform
  ) {
    platform.resume.subscribe(() => this.resumed = true);
  }
}

Other information:

Ionic info:

Ionic:

   Ionic CLI                     : 5.2.3 (/.nvm/versions/node/v12.5.0/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.6.2
   @angular-devkit/build-angular : 0.13.9
   @angular-devkit/schematics    : 7.3.9
   @angular/cli                  : 7.3.9
   @ionic/angular-toolkit        : 1.5.1

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : ios 5.0.1
   Cordova Plugins   : cordova-plugin-ionic 5.3.1, cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.1, (and 10 other plugins)

Utility:

   cordova-res : 0.6.0 
   native-run  : 0.2.5 (update available: 0.2.8)

System:

   Android SDK Tools : 26.1.1 (/usr/local/Cellar/android-sdk/24.4.1_1)
   ios-deploy        : 1.9.2
   ios-sim           : 8.0.1
   NodeJS            : v12.5.0 (/.nvm/versions/node/v12.5.0/bin/node)
   npm               : 6.10.1
   OS                : macOS Mojave
   Xcode             : Xcode 10.2.1 Build version 10E1001
@ionitron-bot ionitron-bot bot added the triage label Jul 18, 2019
@liamdebeasi liamdebeasi added package: core @ionic/core package type: bug a confirmed bug report labels Jul 22, 2019
@ionitron-bot ionitron-bot bot removed the triage label Jul 22, 2019
@liamdebeasi liamdebeasi added package: angular @ionic/angular package and removed package: core @ionic/core package labels Jul 22, 2019
@ionitron-bot
Copy link

ionitron-bot bot commented Aug 21, 2019

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Aug 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: angular @ionic/angular package type: bug a confirmed bug report
Projects
None yet
Development

No branches or pull requests

2 participants