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: #29290
Comments
As per documentation this is intended result. remove mode from router-outliet and it will work as intended. |
Maybe I didn't explain the issue well enough. It is only applying the mode set on the So the expected behavior is that it would either
Example. If the |
Any updates on this? |
Apologies for the delay. I can confirm that this is fixed in Ionic 8. In previous versions of Ionic, your page component was initially mounted as a sibling of By the time the delayed Item in your demo was added, the page component had already been moved to be a child of the RouterOutlet, so now Ionic does consider the In Ionic 8 we fixed this so the page component is always mounted as a child of the RouterOutlet initially, so no moving is needed. |
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. |
Prerequisites
Ionic Framework Version
v7.x
Current Behavior
Angular Version: 17.2.4
Ionic Type: angular-standalone
Issues shows on: ios, android, and browser
When you set the
mode
onion-router-outlet
, it will override the platform style mode on all conditionally rendered ionic components (components that are rendered in an @if, *ngIf, @for, *ngFor). So, if you have<ion-router-outlet mode="md"></ion-router-outlet>
, and then on a page have@if(true){<ion-select></ion-select>}
, the ion-select will use themd
platform style, even when running on an ios device.Expected Behavior
The mode of the
ion-router-outlet
should have no effect on the platform style mode of conditionally rendered components (or any components rendered inside it), and should only modify its own behavior.Steps to Reproduce
npm install
npm run start
ion-select
to conditionally render (1 second).md
platform stylesapp.components.html
file, and remove themode
property from theion-router-outlet
ion-select
now correctly uses theios
platform styles.Code Reproduction URL
https://github.com/Jesspu/ionic-platform-styles-bug
Ionic Info
Ionic:
Ionic CLI : 7.2.0 (/Users/patmj/.volta/tools/image/packages/@ionic/cli/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 7.8.3
@angular-devkit/build-angular : 17.3.3
@angular-devkit/schematics : 17.3.3
@angular/cli : 17.2.3
@ionic/angular-toolkit : 11.0.1
Capacitor:
Capacitor CLI : 5.7.4
@capacitor/android : not installed
@capacitor/core : 5.7.4
@capacitor/ios : not installed
Utility:
cordova-res : not installed globally
native-run : 2.0.1
System:
NodeJS : v20.9.0 (/Users/patmj/.volta/tools/image/node/20.9.0/bin/node)
npm : 10.1.0
OS : macOS Unknown
Additional Information
No response
The text was updated successfully, but these errors were encountered: