After successfully storing data in PouchDB, I'm wondering how to retrieve this information and display it in HTML using AngularJS.
var db = new PouchDB('infoDB');
function getData(){
$.getJSON('test.json', function(data) {
var row = data[0].Row;
var info = [];
db.destroy().then(function () {
return new PouchDB('infoDB');
}).then(function(db){
for (var i = 0; i < row.length; i++) {
var info = {
_id: row[i].id,
name: row[i].name,
email: row[i].email,
age: row[i].age
}
db.put(info).then(function(result){
console.log("Everything is ok!");
}).catch(function(err){
console.log('Oh No!');
console.log(err);
});
}
});
});
}
getData();