json-api-store icon indicating copy to clipboard operation
json-api-store copied to clipboard

Broadcast CLUD actions through the central observable.

Open haydn opened this issue 9 years ago • 0 comments

All CLUD actions (create, load, update and destroy) could have their events broadcast through store.observable.

store.observable.filter(x => x.type === "loaded").subscribe(x => console.log(x));
store.load("products", "1");

There might need to be before and after events:

store.observable.filter(x => x.type === "loadStarted").subscribe(x => console.log(x));
store.observable.filter(x => x.type === "loadCompleted").subscribe(x => console.log(x));
store.load("products", "1");

haydn avatar Oct 06 '15 00:10 haydn