- To install Cordova and Ionic, use
- npm install -g cordova ionic. - Make sure to install the latest version of JDK and Android Studio IDE for Android development.
- To create a new project, use
- ionic start projectname template. - Inside the project folder, you can add Android/iOS platform based on your development using the command
- ionic cordova platform add android. for add particular android version means example ionic cordova platform add android@6.4.0 - After these code changes are done, you can generate the required .apk file with the command
- ionic cordova build android. - Once the .apk file is generated successfully, you deploy the file on a real device and do the testing, or you can test it as a web application using a browser.
- To run it in a browser, use
- ionic serve. - To run it on a device, use
- ionic cordova run android --device.
<!DOCTYPE html> <html> <head> <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> <title>Change Color of Google Material Design Icons Example</title> </head> <body> <i class="material-icons">important_devices</i> <i class="material-icons" style="font-size:40px;">important_devices</i> <i class="material-icons" style="font-size:50px;color:blue">important_devices</i> </body> </html>
Comments
Post a Comment