Skip to content

Copy by Value vs by Reference on Drop #143

Closed
@drubarth

Description

@drubarth

I've added the angular-dragdrop into my code and it works quite well, except for one issue I'm having. When I drag an array element that contains objects and drop it onto a new array, the objects inside my array element appear to be getting passed by value rather than by reference.

I believe it's the line in your code that does the angular copy (dropItem = angular.copy(dropItem);) which is breaking the inheritance chain. I would be great to have an option to maintain the connection with the original objects.

Thoughts on this? I'm still learning JS and Angular, so please let me know if I'm missing something here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions