1、檢查系統(tǒng)環(huán)境
$ node -v
$ npm -v
$ ionic -v
2、創(chuàng)建第一個(gè)tabs
$ ionic start demo-tabs tabs
由于國(guó)內(nèi)防火墻限制,安裝過(guò)程中可能會(huì)有如下報(bào)錯(cuò)
3、根據(jù)提示重新修復(fù)安裝
(1)安裝國(guó)內(nèi)鏡像
$ npm install -g cnpm --registry=https://registry.npm.taobao.org
(2)cmd切換至新創(chuàng)建項(xiàng)目的文件夾下
$ cd demo-tabs
(3)使用國(guó)內(nèi)鏡像執(zhí)行修復(fù)安裝
$ cnpm install
(4)修復(fù)安裝完成号胚,驗(yàn)證是否可用
$ cnpm install --save-dev --save-exact @ionic/cli-plugin-ionic-angular@latest
$ ionic serve
(5)瀏覽訪問(wèn) 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猫胁、至此全部完成箱亿,歡迎大家技術(shù)交流,配置過(guò)程中有問(wèn)題可加群求助