Adding local db update adding angular service for pouchdb