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
arnoldjair commented
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);
}
);
});
bramski commented
bramski commented
Read the docs. Debug your issue. Please don't waste my time. Use github markup, write code I can reproduce or at least read.
arnoldjair commented
That is what i'm doing. But i can't find the problem. Sorry-.