You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to get ydn-db working on my Windows phone, but I get a connection timeout everytime I start the application. When I place the initDatabase code outside Angular, the timeout error does not occur. Does anyone know why this problem is happening and how to fix it?
PS: On Android, iPhone, Google chrome etc. it's working fine.
angular.module('example')
.factory('exampleDB', function($q, $window) {
var exampledb;
function initDatabase(){
var scheme = {
version: 1,
stores: [{
name: 'exampledb',
keyPath: 'id'
}]};
exampledb= new ydn.db.Storage('exampledb', scheme);
exampledb.addEventListener('ready', function(ev) {
if (isNaN(ev.getOldVersion())) {
// new database is created
loaded = true;
deferred.resolve(true);
} else if (ev.getVersion() > ev.getOldVersion()) {
// schema upgrade, do data upgrade as necessary
} else {
loaded = true;
deferred.resolve(true);
}
});
exampledb.addEventListener('fail', function(ev) {
var err = ev.getError();
console.log(err);
});
}
......
});
The text was updated successfully, but these errors were encountered:
Hi,
I am trying to get ydn-db working on my Windows phone, but I get a connection timeout everytime I start the application. When I place the initDatabase code outside Angular, the timeout error does not occur. Does anyone know why this problem is happening and how to fix it?
PS: On Android, iPhone, Google chrome etc. it's working fine.
The text was updated successfully, but these errors were encountered: