AngularJS app vs Ionic app: What do they have in common? - angularjs

I have just started learning Angular and Ionic, and I have been asking myself, what do they have in common, so I could share my code between the two applications?

AngularJS is a framework to developing web application using Javascript and Html, Ionic is a framework for developing hybrid apps, Ionic require Angularjs to work and get all features, as documentation say:
Ionic currently requires AngularJS in order to work at its full potential. While you can still use the CSS portion of the framework, you'll miss out on powerful UI interactions, gestures, animations, and other things.
In simple words, Ionic extends Angular features and transform it in a framework for create mobile apps.
I hope this help you a bit.

Related

Which version of ionic should we use

We currently have a web app based on AnjularJS 1.4. Now we need to develop mobile apps for our product. We think ionic to be a good framework for us since it's Angular based.
The team has no experience on ionic framework. Now the question is which version of ionic should we use? How to convert one AngularJS 1.4 we app into ionic mobile apps and maximize code reuse? Ionic 2 seems to have better performance and other benefits. Is it possible to make ionic 2 and AngularJS 1.4 coexists in the same code base and reuse current code?
There is no straight way to do it. Ionic 2 is based on Angular 2, and comes with many significant performance, usability, and feature improvements.
Ionic 1 at a very high-level is essentially just a wrapper & directive/component library for AngularJS 1.x. Ionic 2 is built to utilize all the benefits of Angular 2+.
In short, everything must be upgraded in order to get the benefits of Ionic 2. So, If everything you have is working, and performance isn't sluggish, there really is no reason to to choose Ionic 2, you can use Ionic 1.
You need to port your code to Angular 2 in order to run with Ionic 2 because Ionic 2 builds upon AngularJs 2.
It takes Angular 2 and adds additional features, like different routing, styles, etc.

IONIC and Angular as Front-End developments

What I want to get from IONIC and Angularjs right now is just using that front-end library like CSS and JS. So far we use bootstrap and jquery for frontend framework, and Laravel for its backend. Now I want to switch from Bootstrap to Ionic, and from jquery to AngularJS.
In this case, I will use ionic not only for hybird app development (what I have been doing so far), but right now I also want to use it for web too.
Last Framework I use to build web app:
Laravel
Jquery
Bootstrap
But the framework I want to use right now are:
Laravel,
AngularJS,
Ionic,
Is it possible for them to work as what they are? and how to set it up.
Please notice that my focus right now is to build web application here, not mobile app. And my environment for this is LAMP. Please direct me to the correct way for this. Many thanks in advance!

Create a mobile webapp with Angular

I'm currently learning Angular JS and plan on creating a website using RESTFul to communicate with the server (which will be in Node.js).
I would like to know how to proceed to "convert" this website into a mobile app.
I saw tools like Apache Cordova but I have no mobile developing experience so I don't really know how all of this works.
I saw other tools like Ionic and ngCordova (created by Ionic) but I don't get the point, Angular is just a JS script to insert in my HTML page right ?
So why would I need something like Ionic ? Isn't Apache Cordova enough ?
Ionic is a webframework that makes use of apache cordova in the back.
Cordova is used for mobile app programming in javascript and will compile your javascript code to native code for android, iOS, ...
AngularJS is used for making development of Single Page Web Applications more delightful by offering many nice code features for programming MVC apps.
Ionic now at the end, puts it all together by offering you user interface components that will look native on all mobile devices + the browser. And on top offers you angular js modules that make working with webapps easier (e.g. navigationHistory ...)
If you start new and want to create a nifty mobile application, I would start with ionic. It comes with a lot of css or sass that makes it feel / look native and of course you can change everything to your needs. To access phone features (e.g. location, camera ...) cordova steps in. I suggest doing this guide, that will take you through your first ionic app.

Is AngularJS a good choice if I want my website to be also used on phones?

I have to create a small/medium web application which require quite a lot of JavaScript use.
I was planning on using AngularJS mostly because I'm familiar with it.
My question is: How well will my application work on a phone web browser if it's using AngularJS?
As long as you are using one of the responsive web CSS frameworks like Bootstrap for your HTML you are good to go. There are many great web sites with bootstrap and angularjs that look awesome on mobile devices too.

Why is it advised not to use Ionic framework for creating webapps?

I read comments and advice about Ionic framework being used mainly for Hybrid apps (via phonegap). What is the reason that it is not recommended for a web-app on mobile?
Inoic built as a hybrid mobile app platform, it's purpose is to wrap Cordova and it's device proxy abilities and implement it using angular and ui-router. The UI components are mobile suited and would not fit a large browser screen.
In order to achieve that in web development you can just use Angular + Angular UI + Bootstrap, plus you can create the data module to be loosely coupled from the ionic app and share it among both platforms

Resources