Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

insert element #22

Closed
pedrorw opened this issue Apr 28, 2015 · 3 comments
Closed

insert element #22

pedrorw opened this issue Apr 28, 2015 · 3 comments

Comments

@pedrorw
Copy link

pedrorw commented Apr 28, 2015

In the example for inserting I see this code:
$indexedDB.openStore('people', (store) ->
store.insert({"ssn": "444-444-222-111","name": "John Doe", "age": 57}).then(function(e){...});
store.getAll().then(function(people) {
// Update scope
$scope.objects = people;
});
I don't know coffee script, but I I've been trying to mke it work in plain js, i converted it to:

$indexedDB.openStore('name', function(store){
store.insert({
'_id': shape._id,
'other': other,
'data': shape
});
});

but it doesn't work, any advice?

@bramski
Copy link
Owner

bramski commented Apr 28, 2015

I'm not sure I understand. "but it doesn't work". I'd suggest you make a plunkr to illustrate your issue.

@flashnet69
Copy link

I have the same problem.

I try this code but datas are not insert in my store :

$indexedDB.openStore('entreprises', function(store) {
store.insert(data.items[0]);
})

On line 705 in angular-indexed-db.js, i try to do a console.log('test') but never appears... I'm new with Angularjs , perhaps my method of research is not good...

return openTransaction([storeName], mode).then(function(transaction) {
console.log('here');
var results;
results = callBack(new ObjectStore(storeName, transaction));
return appendResultsToPromise(transaction.promise, results);
});

Maybe this can help you ?

@bramski
Copy link
Owner

bramski commented Jun 7, 2015

Please move your request for help to stack overflow. I don't want to pollute the issues on this project with "help-needed".

@bramski bramski closed this as completed Jun 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants