Simple Ionic 3 pre-populated database starter project.
- Clone project
git clone https://github.com/iursevla/ionic3-PreDB.git
- Inside the project folder run:
npm i
- Add android platform:
ionic cordova platform add android
- Next:
ionic cordova build android
- After that:
ionic cordova run android
- node v8.6.0
- npm 5.5.1
- ionic/cli-utils : 1.15.2
- ionic (Ionic CLI) : 3.15.2
- cordova (Cordova CLI) : 7.1.0
- ionic/app-scripts : 3.0.1
- Cordova Platforms : android 6.3.0
- Ionic Framework : ionic-angular 3.8.0
Tested with:
- Android 5.1.1 - Physical Device Moto G3 Android 5.1.1
- Android 6.0.0 - Google Nexus 5X - 6.0.0 - API 23 from Genymotion
- Android 7.0.0 - Custom 7.0.0 API 24 from Genymotion
- node v6.11.4
- npm 3.5.2
- ionic/cli-utils : 1.15.0
- ionic (Ionic CLI) : 3.15.0
- cordova (Cordova CLI) : 7.1.0
- ionic/app-scripts : 3.0.1
- Cordova Platforms : android 6.3.0
- Ionic Framework : ionic-angular 3.8.0
Tested with:
- Android 5.1.1 - Physical Device Moto G3 Android 5.1.1
- Android 6.0.0 - Google Nexus 5X - 6.0.0 - API 23 from Genymotion
- Create ionic project e.g.,
ionic start projectName blank
- Run
npm install --save @ionic-native/sqlite
- Add cordova-sqlite-ext:
ionic cordova plugin add cordova-sqlite-ext
- Create the database (you can use DB Browser for this) and copy the .db file to your project
/www
folder. - Add code to your
home.ts
folder to open the pre-populated database and then execute some query on a existing table on said database. - Run your project on a emulator/device and see the results.