ionic3創(chuàng)建第一個項目demo

1、檢查系統(tǒng)環(huán)境

$ node -v
$ npm -v
$ ionic -v
檢查環(huán)境版本

2、創(chuàng)建第一個tabs

$ ionic start demo-tabs tabs

由于國內(nèi)防火墻限制,安裝過程中可能會有如下報錯

3、根據(jù)提示重新修復安裝

(1)安裝國內(nèi)鏡像

$ npm install -g cnpm --registry=https://registry.npm.taobao.org

(2)cmd切換至新創(chuàng)建項目的文件夾下

$ cd demo-tabs
確保cmd在項目文件夾下

(3)使用國內(nèi)鏡像執(zhí)行修復安裝

$ cnpm install
cnpm install修復安裝

(4)修復安裝完成,驗證是否可用

$ cnpm install --save-dev --save-exact @ionic/cli-plugin-ionic-angular@latest
$ ionic serve
如有提示,輸入“Y”回車繼續(xù)
服務正常開啟

(5)瀏覽訪問 http://localhost:8100/

4、推薦另一種創(chuàng)建方式
http://blog.ionic.io/ionic-cli-v3-beta/

$ ionic start --skip-npm

tabs ............... ionic-angular A starting project with a simple tabbed interface
blank .............. ionic-angular A blank starter project
sidemenu ........... ionic-angular A starting project with a side menu with navigation in the content area
super .............. ionic-angular A starting project complete with pre-built pages, providers and best practices for Ionic development.
conference ......... ionic-angular A project that demonstrates a realworld application
tutorial ........... ionic-angular A tutorial based project that goes along with the Ionic documentation
aws ................ ionic-angular AWS Mobile Hub Starter

5、至此全部完成,歡迎大家技術交流,配置過程中有問題可加群求助

點擊加入【老王Discuz/ionic交流】QQ群

最后編輯于
?著作權歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

相關閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容