angularjs - Angular service and pouchdb -


how use angularjs service call pouchdb , return data controller? have been working on ionic app pouchdb local storage. have simple crud app built in controller. want start move pouchdb calls service. haven’t been able data service. how use service call pouchdb docs , return controller?

one strategy think work angular services this one. describes method keeping in-memory array synced result of pouchdb's alldocs().

since it's array automatically stays synced pouchdb, can ng-repeat on it, , you're done. :)


Comments

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -