Try something different, Let's see the advanced features in another Framework: Learn The essential steps & Create incredible Application on "Ionic platform"

04 Mar 2016 Author : Gayatri Patel
Try something different, Let's see the advanced features in another Framework: Learn The essential steps & Create incredible Application on

Always work something new, looking for the new appearances in different Framework simply get any app developers moved on.

Still a few of months before, when thought about making a mobile application, was to operate on the native frameworks specifically, Objective-C for iOS app developing, Java for Android app, and C# for Windows.

 

It's amazing that a mobile application can be developed using simple HTML, Javascript, and CSS. And the most exciting part is that you can apply the equal code base for improving the app for different platforms like Android, IOS, and windows.

Ionic gives a library of mobile- optimized HTML, CSS and JS elements, tools and gestures for producing the highly interactive applications.

 

The great part is it is the free and open source. Ionic is entirely made up of Angular directives and elements.

 

Let’s begin the discussion

 

first Setup

 

We can begin off least demands to make an app in Ionic.

First, make sure you have Node.js, Android SDK, JAVA, ImageMagick - for combining app icon and dash screen, XCode IDE-for iOS.

Now to install Cordova, start the terminal and run this command.

 

$ sudo npm install -g cordova

 

To install Ionic just run this command

 

$ sudo npm install -g ionic

 

For Create Cordova plan

 

Now we require for create a Cordova project on your computer.

For this run the command into the terminal.

 

$ ionic start myApp blank

 

This will generate a folder myApp in the special list in which the command was run. This really generates a new ionic app. Also, you can run the this commands:

 

$ ionic start myApp tabs

$ ionic start myApp sidemenu


Those are some default project produced by the ionic.

 

Configure Platform

 

So Now we require to configures the platforms.

 

For Android

$ionic platform add android

 

For iOS

$ionic platform add ios

 

 

Producing Build and Testing

 

Testing in Browser

 

Testing your application in your desktop browser is quite easy. Just move to the folder, for example, the Cordova project folder and run the complete command.

$ionic serve

 

It will begin live-reload of your project.

Any modification executed in the HTML, JavaScript file, and CSS will automatically reload when you store the file.You can try this:

 

$ionic serve --lab

the -- lab flag is really different and displays how your application will see on IOS & Android.

 

 

Testing in Device

 

To test your application on the device you require for make the build. And For that run these commands.

 

$ionic build

 

For Android:

$ionic build android

 

And For IOS:

$ionic build ios

 

 

For Run the applications:

 

For Android:

$ionic run android

The run command will get the newest form the first and then will install it on any connected devices. Now your first ionic application is into the device.

 

And For iOS:

Just Double Click on the Myapp.Xcode pro J file. It will run into the Xcode.

 

Then you can choose the device and install the app on the device and Also, you can run the app in an emulator for testing.

 

 

Now Add Application Icon and Splash Screen:

 

After the platform configuration, you can see a folder named Resources into the Cordova Project folder.

 

Then in the resources folder put the icon.png and the splash.png. The form for the application icon. The splash can be .psd and .ai.

 

The smallest dimensions for the app icon should be 192 × 192 px, and should not have rounded curves and for the splash, the smallest dimensions should be 2208 × 2208 px.

 

Then run the following commands for creating the app icon and the splash screen

 

$ionic resources --icon

$ionic resources --splash


Then after you can find two folders named being the platform, Android, and iOS into the ‘resources’ folder. view this image These files are automatically connected in the config.xml.

 

 

 

 

 

Understand the Simple login example with Ionic:

 

 

Most of the times we want to have a login at the starting of our application. Managing a login with ionic is really easy. Let’s discuss how to perform a simple login. Later successful login, it will display a simple Dashboard.

 

So at the first we require for build a Cordova Project. Here we are using the default tabs project produced by ionic.

 

$ionic start loginApp tabs

 

Now let's examine this in the desktop browser. Then run the command

 

$ionic serve

 

You can view this screen. The initial screen of the default tabs project.

 

 

 

 

Now what we require is a login page at first and next successful login it will display the Dashboard. So we require for build a different way- login in the app.js

 

 

 

So we have the need to attach a current file.

 

 

 

 

So Now in the controllers.js attach a current controller loginCtrl and write as here.

 

 

 

 

You can modify the templates as you wish and you can write your individual CSS in the style.css in www/CSS.

 

Now you can view the application with a login page display here. It will display a popup for wrong credentials.

 

Here just email format and clear validation checked.

 

                                                                                                                                                


 

 

 

Later successful login, it will display the Dashboard.

 

 

 

 

Ionic gives a primary folder construction when you build any unique Cordova Project.

 

Ionic and it is really excellent for developing the hybrid application. Each top app development companies should use different platforms like Ionic to make the hybrid app. Go through the Ionic documentation once with Hyperlink Infosystem. Hyperlink Infosystem belives uniqueness in app development. Contact us now and get your awesome mobile apps.

Get Free Quote Now !