문제

I wish to use indexeddb in my angularjs app. However loading indexeddb and setting op the stores is async; and my route's resolve method already starts querying the db for data on page load.

As the db isn't set up yet, the query fails.

What is the best way to handle this?

Is there a way in angularjs to wait for my indexeddb to load before starting the app?

도움이 되었습니까?

해결책

You could do manual bootstrap of your modules instead of angular doing it. I suppose indexeddb has a way to intimate when it's done loading.. In that callback, you could bootstrap angular. Refer http://docs.angularjs.org/guide/bootstrap for manual initialization.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top