Ionic HTML5 Basic concepts

What is Ionic and Cordova?

Ionic builds on top of Cordova.

Apache Cordova takes care of packaging your HTML5 app as a native app that can run in Android, iOS, and other platforms.

But if you simply take an existing website and package it as a mobile app the result will look nothing like a native app: users will notice very quickly that the styles and behaviours are pretty different.

That’s the “missing piece” that Ionic provides: a set of front-end components (HTML/CSS/JavaScript and AngularJS) that let you write an HTML5 app that looks like a native app.

Project Structure?

project structure

Files in JS Folder ?

It contains separate module for app, controllers, directives, routes, services

  • app.js : The main file that links all the other modules.
  • controllers.js : deals with functions for particular page.
  • directives.js : Directives can either just be a attribute/class that triggers custom behavior on an element, or in some cases, they act a lot like custom elements
  • routes.js : deals with the routing between pages.
  • services.js : deals with functions common to all page . Eg:- Sessions

 

Advertisement

One thought on “Ionic HTML5 Basic concepts

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s