-
-
Notifications
You must be signed in to change notification settings - Fork 241
Description
We experience some very odd rendering issues with ListViews in the lastest next version of nativescript-angular (all 1.3.0-2016 untill at least 1.3.0-2016-11-30-1112).
I've recorded a demo video here:
https://github.com/m-abs/angular2-seed-advanced/blob/ng2-list-view-bug/bug-video.mkv?raw=true
As you can see in the video:
- I've a small ListView (at the bottom of the HomeComponent) each item have a title and one of the items have a now_playing-icon to the right.
- I navigate to another page.
- And click the back-button, so I end up at the first page again.
- When I click back to the first page.* Now the ListView is suddenly just the icon.
The template can be seen here: https://github.com/m-abs/angular2-seed-advanced/blob/ng2-list-view-bug/src/client/app/components/home/home.component.tns.html#L17-L24
The data for the listview can be seen here: https://github.com/m-abs/angular2-seed-advanced/blob/ng2-list-view-bug/src/client/app/components/home/home.component.ts#L30-L50
I think it happens because there is an element with *ngIf
under the ListView
-template.
It seems that the first element with *ngIf
gets rendered as the whole item-view, even if the truthiness value is false.
In my example I used an Image
-element, but if I replace it with a Label, the Label is rendered on all the ListView
-items. and if I add two elements only the first of them is rendered. Regardless of the *ngIf
value.
Whole demo project is here: https://github.com/m-abs/angular2-seed-advanced/tree/ng2-list-view-bug