Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deep copy of a cached resource #45

Open
leseulsteve opened this issue Sep 25, 2014 · 1 comment
Open

deep copy of a cached resource #45

leseulsteve opened this issue Sep 25, 2014 · 1 comment
Labels

Comments

@leseulsteve
Copy link

Great module btw! Good work guys!

I use angular.copy() to put a resource in a temp variable to revert change made on it later on.
It doesn't work, with this code:

itemTemp = angular.copy(item);
console.log(item, itemTemp)
item = itemTemp;
item.$update(); // PUT METHOD

I get this in the console:

CachedResource {id: 1}, Object {id: 1}
XMLHttpRequest cannot load ...

@hazeledmands
Copy link
Contributor

Awesome! Thanks for the report; sorry for taking such a long time to take a look into it. Filed as a bug; I'll try and fix it soon as I can. In the meantime, if you have the bandwidth to write a failing test for it that'd be excellent!

@hazeledmands hazeledmands changed the title deep copy of a cached ressource deep copy of a cached resource Nov 19, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants