NativeScript/angular

*ngIf appends Span element in the end

lekhmanrus opened this issue · 0 comments

Environment

  • CLI: 8.2.2
  • Cross-platform modules: 8.2.4-alpha.2
  • Android Runtime: 8.2.2
  • iOS Runtime: 8.2.4-alpha.1
  • Plugin(s):
  • NativeScript-Angular: 13.0.4-alpha.1
  • Angular: 14.0.0-next.13

Describe the bug
*ngIf appends an element to the end and ignores its actual location in the node tree.

To Reproduce

<Label textWrap="true">
  <Span *ngIf="true" text="1"></Span>
  <Span text="2"></Span>
</Label>

Expected behavior
Renders as:

<Label textWrap="true">
  <Span text="1"></Span>
  <Span text="2"></Span>
</Label>

Actual behavior
Currently rendering to:

<Label textWrap="true">
  <Span text="2"></Span>
  <Span text="1"></Span>
</Label>