To do well, you must first sharpen your tools. This article describes how to build an ionic Development Environment on Windows and Mac ox platforms.
1. Install node. js
Go to the node. js Official Website: https://nodejs.org/there are two nodes in the official website: node.js, which are lts (supported for a long time) and current. We recommend that you use the LTS version for download. During installation, the next step is OK during the installation of Windows platform, and the installation of MAC ox platform is OK. After the installation is complete, open the command line in windows, while the Mac ox opens the terminal and enter:
Node-V
Press enter. If the node version number is displayed, the installation is successful.
Figure 1 node. js Official Website
Figure 2 If node. JS is successfully installed, enter node-V
2. Install CORDOVA
For Windows and Mac ox, open the command line and terminal and use the following command to install CORDOVA
NPM install-G CORDOVA
Input
Cordova-V
The prompt Cordova version indicates that the installation is successful.
Figure 3 installation successful
3. Install ionic
Run the following command to install:
NPM install-G ionic
Input
Ionic-V
If the ionic version is displayed, the installation is successful.
Figure 4 installation successful
4. Create an ionic project and debug it on Google Chrome
Use the command line or terminal to enter the directory input for creating the ionic Project
Ionic start myproject
Enter
CD myproject
Enter the created Project
Input
Ionic serve
Enter the address for debugging and enter localhost. (An error is displayed in the window in windows. You can directly enter http: // localhost: 8100/#/TAB/dash. The remaining operations are the same as those of Max ox.) In Mac ox, Google's browser will be opened automatically, and command + ALT + I will be held down (Windows is F12) click the button in the debugging mode to preview the running status of the ionic project on your mobile phone. Now a complete official ionic demo has been set up.
Figure 5 Google Chrome mobile phone Simulation
Figure 6 demo running
2. Ionic series ionic Development Environment (1)