Ionic for Mac new and debug

Source: Internet
Author: User

Ionic official website: http://ionicframework.com/

First you need to download node.js:https://nodejs.org/en/

Today's node. JS is typically with NPM;

In the Command Window enter NPM-V query NPM version input node--version query node. JS version

First download the node. js with the new tool command is:NPM install-g N If the commands for Mac installation are to be added sudo such as:sudo npm install-g n

Enter the installation password to install, and then enter the command:N stable to follow the new node. JS to the latest stable version of Mac under command line sudo N stable;

Then is to download Cordova and ionic;

Open Command Window inputnpm install -g cordova ionic 为一起安装 也可以分开安装 先安装npm install -g cordova 再安装 npm install -g  ionic ;跟新cordova或者ionic命令 npm update -g cordova 或者 npm update -g ionic ;删除命令 npm uninstall cordova ;mac下加sudo

After download, according to Ionic official website command

1: Enter the folder where you want to create the project input command:ionic start myApp tabs  myApp是工程名,tabs为工程模式。ionic模式存在blank tabs sidemenu,替换模式就会创建相应的工程;默认为 tabs类型 可直接命令ionic start myAPP;

2: Enter the project file you created, input the command Ionic platform add Android old build Android project, folder will generate platforms folder inside the Android file is Android project

3: one. Run Android project directly, we plug in Android phone or run Android emulator, then ionic build Android to compile Android project, then Ionic run Android The program should run on your phone or simulator to see it. Two. Open with Android Studio, Open Andorid Studio directly, and then open this Android project, then run like a normal program.

4:web write: Download webstorm, this charge can be cracked version, or other web development tools open the project directory under the WWW file, for Web page writing

5: Debug Run: Download tomcat, then open the WebApps folder where the WWW folder is placed directly under Tomcat Change the address in Android to a Tomcat address to access it or run it directly under the Assests folder (you can't find Android);

6: Other page Quick Debug tool (requires VPN), enter PHONEGAP official website: http://phonegap.com/, according to his steps now in desktop tool Install our desktop app, then the App Store or Google Play on the search phonegap Developer Download the Phone Connection tool, open the Desktop tool click? Add the amount of ionic items you created, and then open the Phone connection tool to see the real-time changes in the page.

Ionic for Mac new and debug

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.