bramski/angular-indexedDB

Error: Failed to execute 'add' on 'IDBObjectStore': The object store uses out-of-line keys and has no key generator and the key parameter was not provided.

arnoldjair opened this issue · 3 comments

app.js
var cursosStore = db.createObjectStore('Cursos',
{keypath: 'id', autoincrement: true}
);

Controller
$indexedDB.openStore('materias', function (store) {
var materia1 = {
id: 1,
nombre: "prueba",
descripcion: "prueba"
};
store.insert()
.then(
function (data) {
console.log(data);
},
function (error) {
console.log(error);
}
);
});

Read the docs. Debug your issue. Please don't waste my time. Use github markup, write code I can reproduce or at least read.

That is what i'm doing. But i can't find the problem. Sorry-.