X Tutup
Skip to content

NgFor with NgIf does not produce the correct results (Beta1) #6304

@tine2k

Description

@tine2k

I am using NgFor on a <template> tag to render list items. Every iteration renders a list item. In addtion, every other iteration should render another list item (for every even index number, conditional with NgIf).

Have a look at this: http://codepen.io/tine2k/pen/ZQLZav?editors=001
Reproduce the bug by hitting the button several times and watch the wrong list item order. It should be "0, even number, 1, 2, even number, 3, 4, even number" and so on.

This works fine by hiding the list item using ngClass: http://codepen.io/tine2k/pen/bEqxBN?editors=001

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    X Tutup