javascript - Cannot delete property '1' of [object Array] - Stack Overflow


I've faced the same issue and according to this article the problem is that user array has non configurable properties. I suppose angular Inputs are set as non configurable. When you do: this.users = this.usersInput you simply pass the reference of input to this.users. The solution is to simply copy input array before splicing. In your case:

    this.users = [...this.usersInput];

Btw. do it in deleteUser method instead of afterViewInit with local variable. You do not need two class props referring to the same object.

Không có nhận xét nào:

Is there a way to chain multiple tailwind css classes on a single hover instance?

 https://stackoverflow.com/questions/73524088/is-there-a-way-to-chain-multiple-tailwind-css-classes-on-a-single-hover-instance There is a wa...