Skip to content
This repository has been archived by the owner on Jun 19, 2018. It is now read-only.

Resetting the events array to a deep clone doesn't re-add the id field #457

Closed
mattlewis92 opened this issue Oct 6, 2016 · 2 comments
Closed
Milestone

Comments

@mattlewis92
Copy link
Owner

Continued from #454 (comment)

@mattlewis92 mattlewis92 added this to the 0.24.x milestone Oct 6, 2016
@0xDanr
Copy link

0xDanr commented Oct 6, 2016

Hi, I tried setting the $id to enumerable but it didn't work. It turned out that angular.equals, which angular $watch uses to detect changes when in deep watch ignores properties that start with the dollar sign ($). Therefore, I changed property $id to watchid (I couldn't use _id since I'm already using that field in my application) and set it to enumerable and it worked. Setting to enumerable as you mentioned was required also. This also required changing $id to watchid in all the templates.

@mattlewis92
Copy link
Owner Author

Ah the $ prefix makes sense, thanks for digging into that, I will get a fix out as soon as I have the time :)

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

No branches or pull requests

2 participants