Important commands of Ionic Framework

If you have decided to learn and work with Ionic Framework, then it’s good to have important commands of it.

So we have listed those handy commands here.

Installing ionic:

Start a new project:

You can use any template name listed below as template_name :

Add android platform:

Add iOS platform:

Create a new page:

Note: Remember to add page-name in declarations and entryComponents arrays in app.module.ts file

Create a new provider:

Run in browser:

Run on android device:

Run on iOS device:

Add a cordova plugin:

Note: Here we’ve used cordova-plugin-camera as example plugin. You can use any other plugin name. Remember to add plugin-name in providers array in app.module.ts file

Remove a cordova plugin:

 

Advantages and disadvantages of Ionic Framework

I’m a fan of native app development. I’ve been developing both Android and iOS app for more than 5 years and still continuing.

However,  I always search for new technologies. If I get anything better, I try to adopt that.

From my this habit, I’ve found angularJS. It’s a very powerful javascript framework that is used in frontend development.

After finding this framework, a question came out of my head. Can we use it in our mobile app development.  While searching for the answer of it I found this ionic framework.

Ionic framework is a multi-platform app development framework powered by cordova. After playing with it for a while the following advantages and disadvantages are found:

Pros or advantages of Ionic Framework:

1. Easy to learn: If you have familiarity with html, css and javascript you can learn it very fast

2. Easy documentation: Ionic has very good and well documentation. Most of the things are covered in their official site. So you don’t have to move around different sites to learn.

3. Rapid development: By running some command line commands, you can create pages (e.g. ionic g page your_page_name), providers etc. When you run a command it generates all files with template codes.  So you don’t have to write everything from scratch.

4. Ionic apps run on different platforms. e.g. Android, iOS, windows etc. As a result you don’t have to write codes for each platform. It reduces development time a lot.

Cons or disadvantages of Ionic Framework:

1. Performance: Native mobile application’s performance is better than ionic app. However, in most of the cases, performance gap is not noticeable.

2. Security: If you are developing financial app e.g. app for bank, ionic framework is not recommended. It may not provide as much security as native application.

3. Limited native functionality: There may be some native functions that may be not available in ionic framework.  In that case you have to develop the plugin yourself. However, there are many plugins available to cover native functionalities.