Skip to content
This repository has been archived by the owner. 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

Comments

Projects
None yet
2 participants
@mattlewis92
Copy link
Owner

mattlewis92 commented Oct 6, 2016

Continued from #454 (comment)

@mattlewis92 mattlewis92 added this to the 0.24.x milestone Oct 6, 2016

@dam417

This comment has been minimized.

Copy link

dam417 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

This comment has been minimized.

Copy link
Owner Author

mattlewis92 commented Oct 6, 2016

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.
You can’t perform that action at this time.