This tutorial describes how to create and run PhoneGap, Apache Cordova and Ionic applications with IntelliJ IDEA.
1. Enable frameworks support
PhoneGap, Apache Cordova and Ionic frameworks support is available in IntelliJ IDEA, WebStorm and AppCode via this plugin. To install it, go toSettings→Plugins→Install JetBrains plugin…, then selectPhoneGap/Cordova Pluginand clickInstall plugin.
2. Configure the executable path
3. Create or open an application
To open an existing PhoneGap/Cordova/Ionic application, simply select its folder via File→Openmenu. Your IDE will detect the application and perform all required configuration steps automatically.
Creating a new application takes just a tad longer: clickFile→New Project…, then selectStatic Web, and thenPhoneGap/Cordova App.
Click Finish, and the IDE will create a new application and all the files it requires:
4. Run your application
To deploy and run your application, you need to create a so called Run Configuration. For that, go to Run→Run Configurations…and use theAddbutton on the left to create aPhoneGap/Cordovarun configuration.
Notice that it's created with default path and other settings, but you can,of course, change any of them as you need.
After the configuration is saved, use it to run your application via Runbutton on the toolbar or via theRunmenu:
In theRuntool window that appears after the application is started you can find the output and logs:
If you're using theemulatecommand, an emulator will be automatically launched before application deployment.