Skip to content

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

Closed

Description

@joakimsoren

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.

Activity

  1. added a commit that references this issue on Dec 13, 2018
    392c219
  2. added a commit that references this issue on Dec 13, 2018
    f05c7d6
  3. ionitron-bot commented on Jan 12, 2019

    @ionitron-bot

    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.

  4. locked and limited conversation to collaborators on Jan 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    package: angular

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions