-
-
Notifications
You must be signed in to change notification settings - Fork 241
Angular 9: Using ngIf changes order of children inside a StackLayout #2176
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
Comments
Just to add in case it helps: this is occuring in FlexboxLayout as well as the StackLayout mentioned above. An I tried manually triggering change detection using ChangeDetectorRef after all elements were loaded, with no luck. |
As a work around, I have added an Update: I found a component where this didn't work, so it isn't a perfect work around. Still, it mostly works. Update 2: I don't know if this brings anything to the table, but this isn't an entirely new issue. I have never been able to resolve an ordering issue with the following (don't mind the Pug, I love the cleanliness of Pug):
The carousel was supposed to display after the first item in the
Here, the newly added |
This one is biting me in so many ways now. :) Hoping there is a fix real soon for this. :) |
Are there any news on this? Really looking forward to this since it's messing up my UI and I don't like the workaround at all :/ |
in Progress... |
I see this occur with an *ngFor
The BBB label will appear before the ngFor labels. |
For now I'm using an additional Stack to get around the problem:
|
I have not seen this in the nativescript 7 release. I believe this has been fixed. |
Can you share your package.json? |
Did you follow this upgrade process? I had some issues with it but have them ironed out now. You should have the latest nativescript globally installed ...
The relevant parts of my
|
Environment
Describe the bug
After upgrading from Angular 8 to Angular 9: When using
*ngIf
on a component that's together with other components wrapped by aStackLayout
, the component with ngIf is always added as the last child when the Page is rendered.To Reproduce
Just start the app from the sample repository.
Expected behavior
"Line 2" is between "Line 1" and "Line 3". ngIf does not change the order of the elements.
Sample project
See here
Please ask when something is left uncleared. Thanks in advance!
The text was updated successfully, but these errors were encountered: