Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5735a01

Browse files
fix(renderer): dynamic views can't be prepended (#2262)
1 parent a868c3a commit 5735a01

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎nativescript-angular/view-util.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ export class ViewUtil {
4141
const extendedParent = this.ensureNgViewExtensions(parent);
4242
const extendedChild = this.ensureNgViewExtensions(child);
4343

44-
if (!previous) {
44+
// the element should be between previous and next
45+
// if there's next but no previous, it's the first element
46+
// if there's previous but no next, it's the last element
47+
// elements that have no previous/next elements must be appended
48+
if (!previous && !next) {
4549
previous = extendedParent.lastChild;
4650
}
4751
this.addToQueue(extendedParent, extendedChild, previous, next);

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /