Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

SQLite opening DB on app.js and using in controller.js

$
0
0

@GabrielBarreto wrote:

Hi, i'm using this tutorial to help me with SQLite: https://www.thepolyglotdeveloper.com/2014/11/use-sqlite-instead-local-storage-ionic-framework/

So here's my question:
Do i have to initialize the DB in my Controller.js to use SQLite Inserts and Selects?

I have made everything in the tutorial:
- Initialized a var called db before my module.
- Put the openDb in my .run $ionicPlatform.ready().
- Created a table.

An now i need to know how to access the database from my controllers in my controller.js.

Thanks

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>