adding offlinegetfrommongo logic to the getFromAngular function