I am creating animated reorderable list with JQueryUI sortable and Angular 7. It works well so far, but the problem occurs, when I am trying to add new object after reordering the list.
Template:
<img class="img-fluid" src="{{sticker[0]}}">
<div class="manage-buttons row mx-0">
<div class="col-6 p-0">
<!--<button class="m-0 p-0 edit btn btn-sm btn-primary">Edit</button>-->
</div>
<div class="col-6 p-0">
<button class="m-0 p-0 delete btn btn-sm btn-danger">Delete</button>
</div>
</div>
I am simply adding new obj like that:
this.stickers.push(['assets/img/cho-choo.jpg']);
Without reordering adding works well, the 'choo-choo.jpg' goes at the end of the list.
But after reordering, when I'm trying to add new image, the image goes to the middle of the content of the sortable list (even if the cho-choo is at last index of the array that I am using in the ngFor).
How can i fix that, and make ngFor render my list items as they are in the array?