Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

angular.copy does not support circular reference #2618

Closed
langdonx opened this issue May 9, 2013 · 6 comments
Closed

angular.copy does not support circular reference #2618

langdonx opened this issue May 9, 2013 · 6 comments

Comments

@langdonx
Copy link

langdonx commented May 9, 2013

As titled and demonstrated here:

http://plnkr.co/edit/dRYPgyi9ITdaEFABJFBB?p=preview

JSON.stringify/angular.copy both fail on circular references, while other implementations of clone do not.

Also, is there some reason shallowCopy isn't exposed via publishExternalAPI like copy is?

@tadchristiansen
Copy link

I am having the same issue, how did you end up dealing with this?

@chrisramakers
Copy link

It would be nice if this could be solved, bumped into this the third time in a few months.

@btford
Copy link
Contributor

btford commented Dec 31, 2013

Angular relies on angular.copy to behave in this way.

other implementations of clone do not

clone is not a standardized function. If you want an implementation that behaves in a certain way, it's best to include your own.

@btford btford closed this as completed Dec 31, 2013
@tkrotoff
Copy link

Before to close this issue, it would be best to improve the documentation.
I've spent a lot of time because of this and I believe others will too.

@btford
Copy link
Contributor

btford commented Dec 31, 2013

@tkrotoff PR welcome. :)

@petebacondarwin
Copy link
Contributor

I believe this is fixed by #7618

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants