Closed Lunatic83 closed 9 years ago
I fixed this, An object could not be cloned because, restangular return result with other function binded inside result object.
table.insert(result, function(result.plain())
Yes. You generally must only try and put simple objects into the indexed-db. I would generally recommend doing something like you have and standardizing your object representation before inserting it. It will make doing things like data migrations much simpler.
Hi bramski I have a problem using angular-indexedDB module with Restangular. Failed to execute 'add' on 'IDBObjectStore': An object could not be cloned. I try to run: Restangular.one(entityName, id).get().then(function(result) { $indexedDB.openStore(entityName, function(table) { table.insert(result, function(result) { console.log('insert ok'); }); }); });
Is possible to use your module with Restangular or an openStore after a promise result?
Thanks for your help.
Gaspare