| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
You can use TypeORM in connection with the cordova-sqlite-storage plugin in your Ionic app. This project demonstrates how that would work.
To run this example in production or development mode you have to make sure, ionic and cordova are installed globally on your machine. After that you can install all necessary dependencies for running this example.
npm -vnpm install -g cordova ionicnpm installionic serveionic cordova platform add ios
# or
ionic cordova platform add androidionic cordova run ios
# or
ionic cordova run androidFor further information please read ionic's deployment guide.
ionic cordova plugin add cordova-sqlite-storage --savenpm install typeorm --savenpm install @types/node --save-devAdd "typeRoots": ["node_modules/@types"] to your tsconfig.json under compilerOptions
Create a custom webpack config file like the one included in this project to use the correct TypeORM version and add the config file to your package.json (Required with TypeORM >= 0.1.7)
Since Ionic make a lot of optimizations while building for production, the following limitations will occur:
Entities have to be marked with the table name (eg @Entity('table_name'))
getRepository() has to be called with the name of the entity instead of the class (eg getRepository('post') as Repository<Post>)
Date fields are not supported:
@Column()
birthdate: Date;| Back | FazBrowse Home | New Git URL |