Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fumito-ito/angularjs-phonegapstorage
An angularJS wrapper for around window.openDatabase for Phonegap/Cordova plugin
https://github.com/fumito-ito/angularjs-phonegapstorage
Last synced: 29 days ago
JSON representation
An angularJS wrapper for around window.openDatabase for Phonegap/Cordova plugin
- Host: GitHub
- URL: https://github.com/fumito-ito/angularjs-phonegapstorage
- Owner: fumito-ito
- License: mit
- Created: 2013-12-17T09:27:13.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2014-01-12T11:46:02.000Z (almost 11 years ago)
- Last Synced: 2024-11-10T19:18:19.443Z (about 2 months ago)
- Language: JavaScript
- Size: 145 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Aungular Phonegap Storage
An angularJS wrapper around window.openDatabase for Phonegap/Cordova plugin
## example
````javascript
function testCtrl ($scope, phonegapStorage) {
// if you want to know details of phonegap storage api, see http://docs.phonegap.com/en/2.9.0/cordova_storage_storage.md.html#Storage
var testDb = phonegapStorage.openDatabase('testDb', '1.0', 'testDb', 1000);var txs = function (tx) {
// executeSql with Promise
tx.executeSql('DROP TABLE IF EXISTS DEMO').then( function (resultObj) {
console.log('success query with id ::', resultObj.resultSet.insetId);
}, function (err) {
console.log('failure query with error ::', err.codde);
});
}// transaction with Promise
test.transaction(txs).then(function () {
console.log('success transaction');
}, function () {
console.log('failure transaction')''
});
}
````