Ionic reorder list on hold PROBLEM!

Hello,

I’m building an app where I have favorites category and I’m trying to implement this to it, so user could rearrange lists.

This is the example I’m trying to use: https://codepen.io/leoz/pen/MwYxmj

I’m using ngStorage and when I try to reorder item, it throws it to original position and creates null list item. The indexes are wrong and it causes this. I have no idea how I should put the indexes.

Thanks in advance!