goodeggs / angular-cached-resource

An AngularJS module to interact with RESTful resources, even when browser is offline
MIT License
216 stars 29 forks source link

Stress the importance of setting bound params #78

Closed sdhull closed 9 years ago

sdhull commented 9 years ago

Create 2 records while offline while assuming the server will provide record ids and watch your 1st record disappear. This commit updates the README to stress the importance of setting your bound parameters.

I can re-word if you like, but this strikes me as important. It's a helluva "gotcha".

kweydt commented 9 years ago

:+1:

sdhull commented 9 years ago

This was a surprise for me, since $resource very much supports saving a new resource without an id

hazeledmands commented 9 years ago

Ah yes, thanks! This is awesome.

sdhull commented 9 years ago

You could also argue that $cachedResource should support saving new records without bound parameters set, but that's significantly more effort. Probably worth doing. In the meantime, this will hopefully help others avoid the issue.