Open PterPmnta opened 7 years ago
The problem is that your app does not wait for the deviceready event before attempting to open a database. This is a common problem with Angular controllers and I already documented this as a pitfall.
I will document the "cannot read property" error as a sign of this pitfall when I get a chance.
@brodybits Thanks for all, now work perfect, sorry, i will to know if exists one way the create the databse without click function xecute a query
I recommend that you look at the suggestion in https://github.com/driftyco/ng-cordova/issues/8#issuecomment-48703042 by @romgar:
An another way is to initialize angular dynamically when cordova is ready.
window.ionic.Platform.ready(function() { angular.bootstrap(document, ['<your_main_app']); });
Works like a charm.
I try to create a new project, but don't work the plugin, this is the error:
This is my code
Image show the plugin install