安装Ionic 2

Ionic 2 is built on top ofCordova, a framework that enables development for cross patform apps with HTML, CSS and JavaScript. Make sure you havenodejsinstalled.

安装 Cordova

$ npm install -g cordova

For Mac/Linux/Unix users, if you see errors withEACCESS, you can run the command as root user withsudo npm install -g cordova, orjust fix your npm persmissions..

安装 Ionic 命令

$ npm install -g ionic

如果安装失败 uninstall 后再次安装

Note: If you see errors you don't understand, you may want to uninstall previous versions of ionic-cli withnpm uninstall -g ionic, clear your cache withnpm cache cleanand then now install ionic-cli withnpm install -g ionic

This installs the Ionic CLI into your workstation, and now we are good to go.

NOTETo check the details of your installed ionic, simply run

$ ionic info

You should see results almost similar to this

You can ignore the warnings for now. Most of them are only necessary when we want to deploy or build to either ios or android.

Finally, we need to haveTypeScript. TypeScript is a superset of JavaScript, and works really well with Angular 2, you can go through the articlesby this authorto quickly get up to speed with TypeScript.

$ npm install -g typescript

results matching ""

    No results matching ""