old one, the first step is of course the environment setup . There
are a total of three necessary software to be installed.
software | Home |
Node.js | http://nodejs.org |
Ionic Cli | http://ionicframework.com |
Cordova | http://cordova/apache.org |
These three must-haves are all familiar,
especially Node.js is crucial, otherwise how can web technologies be used in mobile applications.
Ionic CLI tools can help us manage and preview applications.
After installation, check whether it was successful or not . Version information.
View nodeJs version information
node -v
Command to install Ionic CLI and Cordova
npm install -g cordova ionic
Check if cordova and ionic are successfully installed
cordova -v ionic -v
Personally, I feel that there will be some version problems here. First, I will record the three versions I used for my practice at that time.
node = v 4.4.4
cordova = 6.4.0
ionic = 2.2.1
The update commands for IONIC and cordova.
npm update -g ionic npm update -g cordova
The environment configuration actually ends here.
----------------------------------------- --------------------------------------
Ionic's Hello World project steps.
Create
ionic start chapter1
run in browser
cd project root directory ionic serve
Add a running platform to the project
ionic platform add ios
ionic platform add android
Add the location in the platform
directory Run
IN MAC OS in the simulator
npm install -g ios-sim
ionic emulate ios -l -c
ionic emulate android -l -c
// -l -c means enable 'hot reload'