I don't know how to phrase a better title as I'm obviously not fully understanding what is happening.
Given this plunkr where I recreated my issue:
http://plnkr.co/edit/vaj5peVpteYQx4iZd3pw?p=preview
this.items.splice(i, 1); -> refresh
this.items.splice(i - 1, 1); -> or any other i (not the target of the method) no refresh
Somebody can explain to me why:
Adding a Cabron is fine.
Removing a Cabron with the removeALT method is fine.
But instead removing the same Cabron with the default remove Cabron button forces a page refresh?
To reproduce:
1) Click "add Hello" (not part of the test actually)
2) Click "Less Cabron" and the page will refresh.
2 OR) Click either "More Cabron" or "Less Cabron ALT" and the page will not refresh (despite the form being changed and being very similar to "Less Cabron").
I'm trying to give the possibility to add/remove/moveup/movedown fields in a form.
I could do weird things with css and always use the "i +/- x", but I would prefer to understand how to avoid this.
Also on my application (that is run on an external window [window.open()]) the url of the window changes with the parameters of the spliced object passed as URL parameters (no idea why).
example: [starting url, after here is all inserted from that bug]?title=Cabron