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

Routing via Ionic 4 Virtual Scroll makes the user end up outside of ngZone #16432

Closed
joakimsoren opened this issue Nov 23, 2018 · 1 comment · Fixed by #16729
Closed

Routing via Ionic 4 Virtual Scroll makes the user end up outside of ngZone #16432

joakimsoren opened this issue Nov 23, 2018 · 1 comment · Fixed by #16729
Labels
package: angular @ionic/angular package

Comments

@joakimsoren
Copy link

Bug Report

Ionic Info

   ionic (Ionic CLI): 4.3.1 
   Ionic Framework: @ionic/angular 4.0.0-beta.15
   @angular-devkit/build-angular: 0.10.4
   @angular-devkit/schematics: 7.0.4
   @angular/cli: 7.0.4
   @ionic/angular-toolkit: 1.1.0

Describe the Bug
When first navigating to child page via [routerLink] directive inside Ionic 4 Virtual Scroll and then back to the page containing the Virtual Scroll, I get a warning that I'm out of ngZone and It makes it impossible to navigate any further.

Steps to Reproduce
Steps to reproduce the behavior:

  1. Create a Virtual Scroll with routerLink directives on the items.
  2. Click on one of the items navigating to child page.
  3. Click the back button that returns you to the list page
  4. Console now warns me that I'm out of ngZone wich makes it impossible for me to navigate any further.

Related Code

      <ion-virtual-scroll [items]="items$ | async as items" [headerFn]="getHeader" approxItemHeight="107px" approxHeaderHeight="45px">
        
       <ion-item class="activity-header" *virtualHeader="let header" lines="none">
         {{ header.month }}
        </ion-item>

        <ion-card *virtualItem="let item" class="activity-container" [routerLink]="['/calendar/details', item.id]">
      {{ item.name }}
        </ion-card>
      </ion-virtual-scroll>

Expected Behavior
The user should be returned to the parent page and be able to navigate further. No warning about leaving the ngZone should appear.

@ionitron-bot
Copy link

ionitron-bot bot commented Jan 12, 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 Jan 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: angular @ionic/angular package
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants