项目作者: AndrewJBateman

项目描述 :
:clipboard: App to store data using the Ionic 4 framework, cordova SQLite database, cordova SQLite Porter and Capacitor.
高级语言: TypeScript
项目地址: git://github.com/AndrewJBateman/ionic-angular-sqlite.git
创建时间: 2019-05-13T11:06:31Z
项目社区:https://github.com/AndrewJBateman/ionic-angular-sqlite

开源协议:

下载


Ionic Angular SQLite

GitHub repo size
GitHub pull requests
GitHub Repo stars
GitHub last commit

Table of contents

General info

  • App allows user to add details of developer and products.
  • Initial seed data is a short list of developers and dev skills.

Screenshots

example screen print
example screen print

Technologies

Setup

  • Run npm i to install dependencies
  • To start the server on localhost://8100 type: ‘ionic serve’

Code Examples

  • database.service.ts function to get details of a developer from the database that return a promise of format Dev
  1. getDeveloper(id): Promise<Dev> {
  2. return this.database.executeSql('SELECT * FROM developer WHERE id = ?', [id]).then(data => {
  3. let skills = [];
  4. if (data.rows.item[0].skills !== '') {
  5. skills = JSON.parse(data.rows.item[0].skills);
  6. }
  7. return {
  8. id: data.rows.item(0).is,
  9. name: data.rows.item(0).name,
  10. skills,
  11. img: data.rows.item[0].img
  12. };
  13. });
  14. }

Features

  • storage of data in an SQL database.

Status & To-do list

  • Status: compiles and displays in a dev server. Build webpacks created. Needs implementing on an Android device or simulator to use database etc. Database side not tested.
  • To-do: test database to see if it stores Dev and Product details.

Inspiration

:file_folder: License

  • This project is licensed under the terms of the MIT license.

:envelope: Contact