js-data-angular icon indicating copy to clipboard operation
js-data-angular copied to clipboard

lastModified timestamp being checked by $watch before it's updated after a change

Open danthemaen opened this issue 9 years ago • 0 comments

see the plunkr: http://plnkr.co/edit/43QtwMqtpETvvjy3D3YD?p=preview

The issue I update some property on some instance. Now I have a $watch on the lastModified of this resource. The $watch checks the lastModified timestamp before it is updated. This results in the first change "event" not being fired at all.

Since bindAll and bindOne works in the same way, it is possible that the first change doesn't fire there as well - I didn't check that one though.

Dirty Workaround I could just add some delay in the $watch on lastModified and check it again after that delay. This works but is not really statisfying.

I've encountered this issue with chrome on windows and mac - on safari it seems to work fine...

danthemaen avatar Feb 05 '16 11:02 danthemaen