一個基於Ionic3.x cordova的移動APP demo

項目地址, 如遇網絡不佳,請移步國內鏡像加速節點css

前端技術:

Angular4.x + ionic3.x + cordovahtml

項目運行:

git clone git@github.com:EasyTuan/ionic-cordova-demo.git

# 國內鏡像加速節點:git@gitee.com:easytuan/ionic-cordova-demo.git

# 全局安裝ionic和cordova
npm install -g cordova ionic

# 安裝項目依賴
npm install

# 在瀏覽器中啓動項目
npm run serve

# 添加android平臺
ionic cordova platform add android

# usb鏈接安卓手機運行
npm run dev

複製代碼

項目名:[A Ionic3.x project],Ionic3.x的移動APP demo。前端

1. 如何運行

node版本 [8.0.0]node

1.1 開發環境配置

# 安裝ionic和cordova
npm install -g cordova ionic

# 安裝項目依賴
npm install

複製代碼

1.2 開發過程

1.2.1 命令

# 在瀏覽器中啓動項目
ionic serve

# 添加android平臺
ionic cordova platform add android

# usb鏈接安卓手機運行
ionic cordova run android

複製代碼

1.3 發佈

# 打包
npm run build

複製代碼

2. 業務介紹

2.1 小程序業務入口

入口地址爲 src/app/app.module.tsandroid

目錄結構git

ionic-conference-app/
|
|-- resources/
|
|-- src/
|    |-- app/
|    |    ├── app.component.ts
|    |    └── app.module.ts
|    |    └── app.template.html
|    |    └── main.ts
|    |
|    ├── assets/
|    |    ├── fonts/
|    |    |
|    |    ├── icon/
|    |    |
|    |    └── images/
|    |
|    |-- components/                     * 組件
|    |
|    |-- pages/                          * 頁面
|    |
│    ├── services/                       * angular主題
|    |     └── httpService.ts.scss       * http請求封裝
|    |
│    ├── theme/                          * ionic主題配置
|    |     └── variables.scss            * 主題 Sass 變量
|    |
|    └── index.html
|
├── .editorconfig                       * 代碼風格配置文件
├── .gitignore                          * git忽略目錄
├── LICENSE                             
├── README.md                           
├── config.xml                          * Cordova配置文件
├── ionic.config.json                   * Ionic配置文件
├── package.json                        * 依賴配置文件
├── tsconfig.json                       * TypeScript配置選項
└── tslint.json                         * 定義 TypeScript 規則
複製代碼

2.2 已完成功能

  • 底部tabbar的跳轉
  • 組件間的通訊
  • 二級頁面的跳轉
  • http請求通訊
  • app圖標以及啓動頁的配置

部分截圖展現

首頁展現 && 店鋪列表

3. 其餘

ionic開發文檔地址github

ionicframework.com/docs/npm

4. 友情連接

項目完整版本(基於mui)json

License

MIT小程序