Skip to content

ng-template ngFor not repeating within layouts #789

Closed
@tsonevn

Description

@tsonevn

From @x00 on May 6, 2017 13:11

Android / Nativescript 3.0

        <StackLayout>
            <ng-template ngFor let-index [ngForOf]="[1,2,3,4]">
            <Label [text]="'This is Label' + index"></Label>
            </ng-template>
        </StackLayout>

yield only This is Label 1, where as

        <StackLayout>
            <Label text="This is Label 1"></Label>
            <Label text="This is Label 2"></Label>
            <Label text="This is Label 3"></Label>
            <Label text="This is Label 4"></Label>
        </StackLayout>

should have the same result.

this is true is grid wrap and other layouts.

It is also true if you use the depreciated template. It was working prior to update.

Copied from original issue: NativeScript/NativeScript#4133

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions