I have an array like this :
Array[3]
0:Object
ID:7
name:"bestRes3t"
profile:"rest7.png"
rate:0
restaurantCitySlug:"NY"
slug:"fo4o"
__proto__:Object
1:Object
ID:3
name:"bestRest"
profile:"rest.png"
rate:1
restaurantCitySlug:"NY"
slug:"foo"
__proto__:Object
2:Object
ID:7
name:"bestR242es3t"
profile:"re3st7.png"
rate:2
restaurantCitySlug:"NY"
slug:"fo244o"
__proto__:Object
I decided to remove single object (with ID=3) from my array. I've tried with delete myArray[1] but it did not change length of my array. Since ng-repeat depends on length of array it makes a big problem.
<li ng-repeat="(resNo,restaurant) in myArray" style="margin-bottom: 20px"
dnd-draggable="restaurant"
dnd-effect-allowed="move"
dnd-moved="myArray.splice($index, 1)"
dnd-selected="myArray.selected = resNo"
dnd-callback="myArray.length"
>
It shows three list items which one of them is empty however I want to show couple of them cause I've already delete one of them.
Any suggestion?