Skip to content

Commit

Permalink
fix(renderer): dynamic views can't be prepended (#2262)
Browse files Browse the repository at this point in the history
  • Loading branch information
edusperoni committed Sep 21, 2020
1 parent a868c3a commit 5735a01
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion nativescript-angular/view-util.ts
Expand Up @@ -41,7 +41,11 @@ export class ViewUtil {
const extendedParent = this.ensureNgViewExtensions(parent);
const extendedChild = this.ensureNgViewExtensions(child);

if (!previous) {
// the element should be between previous and next
// if there's next but no previous, it's the first element
// if there's previous but no next, it's the last element
// elements that have no previous/next elements must be appended
if (!previous && !next) {
previous = extendedParent.lastChild;
}
this.addToQueue(extendedParent, extendedChild, previous, next);
Expand Down

0 comments on commit 5735a01

Please sign in to comment.