Cordova plugin commands

Add a plugin in app:

Cordova plugin add <plugin>

Search a plugin:

Cordova plugin search <splashscreen>

See the list of plugins added in your app:

Cordova plugin list

Run ionic

​​
​​
export ANDROID_HOME="$HOME/install/adt-bundle-linux-x86_64-20140702/sdk"
 
export PATH="$HOME/install/adt-bundle-linux-x86_64-20140702/sdk/tools:$ANDROID_HOME/platform_tools:$PATH"
Don't run below commands with sudo
ionic start myIonicApp tabs
​​
cd myIonicApp ionic platform add android ionic build android ionic emulate android
Ionic examples:
http://codepen.io/ionic/public-list/

Run npm update -g ionic to update
Open ionic app in browser:
ionic serve
​​
Open ionic app in browser on specific port

​​
ionic serve 8080 8100

Enable cookies in your ionic app

Go to

/node-v0.10.29/ionicnew/platforms/android/src/com/ionicframework/< you package name>

then open CordovaApp.java

insert below line of code:
​
CookieManager.setAcceptFileSchemeCookies(true);      


in ​onCreate() method like:

​super.onCreate(
savedInstanceState);
super.init();
​​
CookieManager.setAcceptFileSchemeCookies(true);       
// Set by <content src="index.html" /> in config.xml
super.setIntegerProperty("splashscreen", R.drawable.screen);
super.loadUrl(Config.getStartUrl());
 
and import following package
 
​import android.webkit.CookieManager;



​ Open ionic app in browser on specific port

​ionic serve 8080 8100

Why Ionic is best for hybrid mobile apps development?

Ionic is an UI framework which is build to create hybrid mobile apps based on Html5.

Unlike a responsive framework, Ionic is packed with very native-styled mobile UI elements and layouts that you get with a native SDK on iOS or Android. Also, Ionic is built on the top of popular AngularJS framework from Google to utilize AngularJS power.

Why Ionic

Build apps with the web platform. Using HTML, CSS, and JavaScript, you can make
hybrid apps that behave like native like mobile apps.


Built with AngularJS. For people familiar with AngularJS (or even another JavaScript
framework like Ember), Ionic is a perfect choice. Ionic is built alongside Angular, which
allows you access to all of Angular’s features as well as any of the many thousands of
Angular modules for additional features. Ionic also uses the popular ui.router module
for navigation, because Angular’s default routing module lacks some features.

Uses modern techniques. Ionic was designed to work with modern CSS3 features, like
animations. Mobile browsers generally have better support for the latest web platform
specifications, which allows you to use those features as well.

Powerful CLI tools. With the Ionic command line tool, you can quickly manage
development tasks such as previewing the app in a browser, emulating the app, or
deploying an app to a connected device. It helps with setting up and starting a project
as well.

Ionic ecosystem. Ionic also provides a rich ecosystem of features that make
development much easier. The Ionic Creator service allows you to use a drag and drop
interface to design and export an app. An upcoming service for remotely building and
deploying apps is also in development. In short, Ionic is all about creating not just the
basic tools for making hybrid apps but also the development tools that will help you
create them efficiently.