All Projects → iursevla → ionic2-PreDB

iursevla / ionic2-PreDB

Licence: Unlicense license
Simple Ionic 2+ with pre-populated database starter project

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to ionic2-PreDB

Chihu2
ionic2-example <吃乎2>混合开发-美食app 🍜 ☕️ 🍦 (This is a support android and apple ionic2 case, a food app)
Stars: ✭ 124 (+785.71%)
Mutual labels:  ionic, ionic2, ionic3
Ionic3 Multilevelsidemenu
Ionic 3 demo of a two-level side menu.
Stars: ✭ 141 (+907.14%)
Mutual labels:  ionic, ionic2, ionic3
ionic-parallax
Parallax Module for Ionic Framework 2+
Stars: ✭ 10 (-28.57%)
Mutual labels:  ionic, ionic2, ionic3
angular-progress-bar
This component allow you to easy incorporate progress-bar to angular/ionic project, providing binding and color options
Stars: ✭ 26 (+85.71%)
Mutual labels:  ionic, ionic2, ionic3
Awesome Ionic
An "awesome" list of Ionic resources
Stars: ✭ 799 (+5607.14%)
Mutual labels:  ionic, ionic2, ionic3
cordova-plugin-today-widget
Add a today widget app extension target to your cordova project.
Stars: ✭ 51 (+264.29%)
Mutual labels:  ionic, ionic2, ionic3
Ionic3 Components
A project full of ionic 3 components and samples - to make life easier :)
Stars: ✭ 1,689 (+11964.29%)
Mutual labels:  ionic, ionic2, ionic3
ionic-uuchat
基于ionic3,angular4的实时聊天app,兼容web端。该项目只是前端部分,所有数据需要请求后端服务器,需要配套express-uuchat-api使用。
Stars: ✭ 14 (+0%)
Mutual labels:  ionic, ionic2, ionic3
Ion2 Calendar
📅 A date picker components for ionic2 /ionic3 / ionic4
Stars: ✭ 537 (+3735.71%)
Mutual labels:  ionic, ionic2, ionic3
Ionic3 Chat
ionic3 chat example
Stars: ✭ 465 (+3221.43%)
Mutual labels:  ionic, ionic2, ionic3
todo-list
TodoList using Ionic2/3 & Firebase: * PWA * SSO Google plus. * Share list via QRcode. * Upload image from Camera or Storage. * Speech Recognition.
Stars: ✭ 18 (+28.57%)
Mutual labels:  ionic, ionic2, ionic3
Wooionic3
An eCommerce App for WooCommerce stores using Ionic 3.
Stars: ✭ 208 (+1385.71%)
Mutual labels:  ionic, ionic2, ionic3
fireblogger
Ionic 2 social media microblogging platform built with firebase 3 as backend
Stars: ✭ 54 (+285.71%)
Mutual labels:  ionic, ionic2, ionic3
ionic-modal-custom-transitions
Add Custom Transitions to Ionic Modals.
Stars: ✭ 22 (+57.14%)
Mutual labels:  ionic, ionic2, ionic3
ionic-uber-clone
Ionic 4 Taxi Booking script
Stars: ✭ 34 (+142.86%)
Mutual labels:  ionic, ionic2, ionic3
Ionic Boilerplate
✨ An Ionic Starter kit featuring Tests, E2E, Karma, Protractor, Jasmine, Istanbul, Gitlab CI, Automatic IPA and APK, TypeScript 2, TsLint, Codelyzer, Typedoc, Yarn, Rollup, and Webpack 2
Stars: ✭ 309 (+2107.14%)
Mutual labels:  ionic, ionic2, ionic3
ionicfirebaseauth
Exemplo de alguns tipos de autenticação com Ionic 2 e Firebase
Stars: ✭ 18 (+28.57%)
Mutual labels:  ionic, ionic2, ionic3
ionic-3-video-calling-using-webrtc
This is demo code of how to implement video calling in ionic 3 using webrtc
Stars: ✭ 58 (+314.29%)
Mutual labels:  ionic, ionic2, ionic3
Ionic2 Calendar
A calendar component based on Ionic framework
Stars: ✭ 338 (+2314.29%)
Mutual labels:  ionic, ionic2, ionic3
Ion Affix
A directive for Ionic framework for creating affix headers.
Stars: ✭ 58 (+314.29%)
Mutual labels:  ionic, ionic2, ionic3

ionic2/3 Pre-Populated Database Example

Simple Ionic 2/3 pre-populated database starter project.

To install this project:

  1. Clone project git clone https://github.com/iursevla/ionic2-PreDB.git
  2. Inside the project folder run: npm i
  3. Add android platform: ionic cordova platform add android
  4. Next: ionic cordova build android
  5. After that: ionic cordova run android

Now you should see on your emulator/device the project and on the main page the elements from the database data.db table testTable.

Important Note

I used the emulator for android Google Nexus 5X - 6.0.0 - API 23 from Genymotion


Start from scratch:

  1. Create ionic project e.g., ionic start projectName blank
  2. Add cordova-sqlite-ext: ionic cordova plugin add cordova-sqlite-ext --save
  3. Create the database (you can use DB Browser for this) and copy the .db file to your project /www folder.
  4. 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.
  5. Run your project on a emulator/device and see the results.

Possible problems

  1. If you can't execute with sucess the commands: ionic build android or ionic run android then run:

    cordova platform add https://github.com/apache/cordova-android

Async/Await

This example contains commented code to use async/await to query the database.

To use this code, you should go to home.ts and comment lines 16-23 and uncomment line 24 and the method called accessDB().

Then go to tsconfig.json and change "target":"es5" to "target":"es2015"

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].