ionic

字数 299 · 2021-01-14

Start

1
ionic start
1
ionic serve

PNPM

1
ionic config set -g npmClient pnpm

Components

Global Style

Required

  • core.css

Recommanded

  • structure.css
  • typegraphy.css
  • normalize.css

Capacitor

Ionic’s cross-platform app runtime.

1
ionic cap add
1
2
3
ionic build
npx cap open android
# install app in Android Studio

Every time you perform a build, you’ll need to copy those changes into your native projects:

1
ionic cap copy

After making updates to the native portion of the code:

1
ionic cap sync

cocoapods
https://guides.cocoapods.org/using/getting-started.html#installation

Storage

a key-value store for simple data

community

SQLite

  • @capacitor-community/sqlite
    • jeep-sqlite
      • sql.js

sql.js uses a virtual database file stored in memory.
https://typeorm.io

Orientation

Cordova Screen Orientation Plugin

Status Bar

https://ionicframework.com/docs/native/status-bar

Misc

custom properties

web components

https://github.com/ionic-team/stencil

Hardware Back

1
2
3
4
useBackButton(10, (processNextHandler) => {
  console.log('Handler was called!');
  processNextHandler();
});