You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
ng-template ngFor not repeating within layouts #789
Hi @x00,
Thank you for reporting this issue.
I tested the above-mentioned scenario and unfortunately have to confirm that this is a real issue for both iOS and Android while using ng-template in NativeScript Angular 2 project.
I am attaching sample project, where this could be reproduced.
None of these display the columns horizontally. The last one only displays the first column. <StackLayout orientation="horizontal" *ngFor="let col of columns"> <Label [text]="col"></Label> </StackLayout>
Activity
tsonevn commentedon May 9, 2017
From @x00 on May 6, 2017 13:31
works correctly but does help if you need a template.
tsonevn commentedon May 9, 2017
From @x00 on May 6, 2017 18:20
I can confirm this with fresh angular app
tsonevn commentedon May 9, 2017
Hi @x00,
Thank you for reporting this issue.
I tested the above-mentioned scenario and unfortunately have to confirm that this is a real issue for both iOS and Android while using
ng-templatein NativeScript Angular 2 project.I am attaching sample project, where this could be reproduced.
Archive.zip
In the meantime, you could use
StackLayoutas a template and attach to itngFordirective. For example:x00 commentedon May 9, 2017
@tsonevn Thank you for the workaround
sis0k0 commentedon May 9, 2017
fixed with #785
davidjonz2005 commentedon Aug 8, 2017
are you sure ? because now i have the same problem
steadycoding commentedon Jul 27, 2018
None of these display the columns horizontally. The last one only displays the first column.
<StackLayout orientation="horizontal" *ngFor="let col of columns"> <Label [text]="col"></Label> </StackLayout><StackLayout orientation="horizontal"> <ListView [items]="columns" class="list-group"> <ng-template let-item="item" let-odd="odd" let-even="even"> <Label [text]="item" class="list-group-item"></Label> </ng-template> </ListView> </StackLayout><GridLayout rows="auto, auto, auto, auto" columns="auto, auto, auto, auto"> <ListView [items]="columns"> <ng-template let-item="item" let-i="index"> <Label row="0" col="i" text="{{item + i}}"></Label> </ng-template> </ListView> </GridLayout>