Comments (3)
Sure. Feel free to open a PR. I'm otherwise uncertain when I'll get to
this as I'm not often using indexedDB in situations where it's not
supported!
On Saturday, October 25, 2014, James Messinger [email protected]
wrote:
Currently, the following lines are outside of the angular.module
definition, which means they run immediately when the file is loaded,
rather than waiting for angular.bootstrap to occur.var IDBKeyRange, indexedDB,
__slice = [].slice;
indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB;
IDBKeyRange = window.IDBKeyRange || window.mozIDBKeyRange || window.webkitIDBKeyRange || window.msIDBKeyRange;The problem is that if I'm running in a browser that doesn't natively
support IndexedDB, and I'm loading a polyfill
https://github.com/axemclion/IndexedDBShim instead, then the above code
will only work if the polyfill is loaded before the
angular-indexed-db.js file. But if the polyfill is being loaded
dynamically (say, as an Angular module, a Require.js module, a Browserify
package, or a Cordova plugin), then the polyfill won't load in time, and
Angular-IndexedDB won't work.To fix this problem, the four lines of code shown above just need to be
moved inside of the angular.module definition. That way, they won't run
until all dynamically-loaded scripts are finished loading and
angular.bootstrap is called.—
Reply to this email directly or view it on GitHub
#4.
from angular-indexeddb.
Ok, will do. Just gotta get my Coffee Script set up first. :)
from angular-indexeddb.
Fixed. Closing.
from angular-indexeddb.
Related Issues (20)
- Adds then retrieves first time. Can't retrieve second time HOT 3
- not able to get error log HOT 2
- Upgrade function ordering HOT 1
- logs in code HOT 3
- Wrong usage of @defer.reject() HOT 6
- Unnecessary runtime bower dependency HOT 1
- Is querying over multi entry indexes implemented? HOT 4
- Extremely slow calling table.getAll() in IE (11) HOT 9
- t text to bianry HOT 1
- Unable to install HOT 2
- Additional Maintainers Needed
- Not able to use $indexedDB, $indexedDBProvider in angular service HOT 1
- How can i check if a data sore is exist to insert in it and if isn't create new one?
- i need a function to call it for creating new data store? HOT 1
- How can i get existing data store names...Please? HOT 1
- Unable to store an array of objects corresponding to one key HOT 1
- A) READ THIS BEFORE YOU CREATE AN ISSUE
- Detect failure at the time of opening the store HOT 4
- getAll with limits HOT 2
- Difference between .getAll() and .each()? HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-indexeddb.