Skip to content

Wrong styling applied with lazy loaded component on named outlet #15961

Closed

Description

@acprawr

Bug Report

Ionic Info
Run ionic info from a terminal/cmd prompt and paste the output below.

Ionic:

   ionic (Ionic CLI)             : 4.2.1 (C:\Users\alex9\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework               : @ionic/angular 4.0.0-beta.13
   @angular-devkit/build-angular : 0.8.5
   @angular-devkit/schematics    : 0.8.5
   @angular/cli                  : 6.2.5
   @ionic/angular-toolkit        : 1.0.0

Cordova:

   cordova (Cordova CLI) : 8.1.2 ([email protected])
   Cordova Platforms     : not available
   Cordova Plugins       : not available

System:

   NodeJS : v8.11.4 (C:\Users\alex9\Programs\nodejs\node.exe)
   npm    : 6.4.1
   OS     : Windows 10

Describe the Bug
A clear and concise description of what the bug is.

Steps to Reproduce
See repository first

Steps to reproduce the behavior:

  1. Create a new ionic 4 project with blank template.
  2. In app.component.html create a named ion-route-outlet under the default one.
  3. In app-routing.module.ts create a route corresponding to the named outlet and lazily loading the home module
  4. In the browser, if you navigate to the route with the named outlet and lazy loaded, you will notice the home component is rendered oddly. If you inspect the code you can see that the app-home element doesn't have the ion-page class set.
    image

Related Code
https://github.com/Alexxino7/ionic-styling-bug

Expected Behavior
The app-home element should have the 'ion-page' class set. I suspect that all the styling the 'ng-component' element has should actually be on the page component.

Additional Context
List any other information that is relevant to your issue. Stack traces, related issues, suggestions on how to fix, Stack Overflow links, forum links, screenshots, OS if applicable, etc.

Activity

  1. late-warrior commented on Nov 17, 2018

    @late-warrior

    Another reproducer here - https://github.com/late-warrior/ionic4-tabs-lazy-load-reproducer if it may help triage quickly. Pasting a gif as well to quickly demo the issue -

    ion-page-error

  2. paulstelzer commented on Dec 7, 2018

    @paulstelzer
    Contributor

    Thanks for the issue! I close this here because the team collects the issues under #16619

  3. ionitron-bot commented on Jan 6, 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 6, 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

    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