I am new to ember js and I am trying to swap element using ember js but its not working. this is my code below.
function swap(arr) {
let tmp = arr[evt.oldIndex];
arr[evt.newIndex] = arr[evt.newIndex];
arr[evt.oldIndex] = tmp;
}
I have look into ember array, and i can't seem to find good swap logic. there is no replaceAt etc. Seems messy when i try to hack around. I have googled but have not been able to find any answer.
Aucun commentaire:
Enregistrer un commentaire