用你喜歡的語言(Vue/React/Angular)快速開發移動應用

Ionic4 - 用你喜歡的語言(Vue/React/Angular)快速開發移動應用

ionic4

認識ionic4

Ionic是一個開源的移動應用程序開發框架,它可以輕鬆地使用web技術構建高質量的跨平臺的移動應用。可以讓我們快速開發移動App、移動端WEB頁面、微信公眾平臺應用,混合app web頁面。

Ionic4目前已經發布了基於Angular的正式版本,對 React 和 Vue 的支持尚處於 alpha 狀態,未來我們可以用自己喜歡的語言結合Ionic來開發移動端應用。

Ionic4是Ionic有史以來最快、最小和最可擴展的版本。

Ionic 4 優異的性能則讓 Ionic 成為了構建高性能 PWA 的最佳 UI 框架。 Ionic 團隊花了一年的時間使用 Stencil 構建一個 Web 組件管道來生成 Ionic 組件,以達到 Google 規定的性能標準,使用新的異步組件加載和交互的方法。確保Ionic4有更快的運行速度。

安裝ionic

首先您需要安裝 Node.js. 其次, 安裝最新版本的cordova 和 ionic command-line tools. 通過參考 Android 和 iOS 官方文檔來安裝.

提示: IOS需要在Mac Os X. 和Xcode環境下面安裝使用 (iOS development requires Mac OS X. iOS simulator through the Ionic CLI requires the ios-sim npm package, which can be installed with the command sudo npm -g install ios-sim.)

npm install -g cordova ionic

通過Ionic創建一個項目

使用Ionic官方提供的現成的應用程序模板,或一個空白的項目創建一個Ionic應用。( Create an Ionic project using one of our ready-made app templates, or a blank one to start fresh.)

ionic start myApp tabs

運行我們剛才創建的Ionic項目

cd myApp

ionic serve

打包成單頁面項目運行在微信/web瀏覽器

ionic build

打包成混合app項目

ionic build

ionic cordova platform add ios

ionic cordova run android

經典前端面試題每日更新,歡迎參與討論,地址:https://github.com/daily-interview/fe-interview。


更多angular1/2/4/5、ionic1/2/3、react、vue、微信小程序、nodejs等技術文章、視頻教程和開源項目,請關注微信公眾號——全棧弄潮兒


分享到:


相關文章: