Ionic 1 AngularJs 1 vs Ionic 2 AngularJs 2? - angularjs

I want to move from IOS to Ionic. But i don't have any idea that which version is best for starting, because i did't know nothing about AngularJs 1 and its update version AngularJs 2 features and differences. And also i did't find any related help from internet with difference of both versions. Can anyone please tell me pros and cons or difference between them. Or which one is best. And if Ionic 2 is best so from where i can watch video tutorials of this.
Thanks

If I remember correctly the podcast episode of Adventures in Angular, John Papa recommended starting new projects with Angular 2.
Since Ionic is built on top of Angular 2 it will be lagging a bit behind. If you want to go into production now with an Ionic 2 app I suppose it's not recommended using it. Since Angular 2 is in RC we might expect that they will release in the near future, and with that Ionic 2 will be some time behind that. Therefore, I recommend using Ionic 2 if you don't plan to go into production in the nearest future.
When it comes to the differences, this article has a nice write up on the differences between Angular 1 and 2.
Edit: It's been a while since I wrote this post and I have followed the development of ionic 2. I would now recommend using ionic 2.

Right now is quite unfortunate time to choose between Ionic/Angular v1 and v2. If you can afford that I would advise you to wait 1 year and the just pick Ionic 2. Most of the problems you will face today when dealing with Ionic/Angular 2 will be already solved here in stackoverflow 12 months from now.
Currently I would say it does not matter that much if you pick Ionic 1 or Ionic 2. In the first case you will move fast now, but waste time later trying to upgrade your app from ionic 1 to ionic 2. If you choose Ionic 2 now, you will waste similar amount of time just trying to make it work and adopt newer versions of Angular 2.

if You beginner you can start ionic-1 and angular-1,because lots of resource available like angularJS essential , Inter mediator and advance video tutorial in youtube and many other training provider.
if you want to include oops concept and other important script like typescript,move on to ionic2.

If you are developing a mobile app, the question is ionic vs ionic 2 vs alternative frameworks. A lot of work has gone to making ionic 2 fast, and unless you already have a lot of apps in ionic there is no point learning it now.
Regarding Angular 2, the benefit of Ionic is that you don't have to learn it to get started. You can create real apps using just Ionic, and when you do need Angular (for http for example) then there are plenty of examples around.
You can find videos on most of the pay learning sites, but to really learn it take an existing app such as https://github.com/driftyco/ionic-conference-app, which includes enough Angular 2 (Javascript and Typescript flavours) to see how a real app can be put together.
You can also play with the Ionic components with https://github.com/driftyco/ionic-preview-app.
The only reason for going Ionic 1 these days would be an edge case supporting an older version of Android, but if you need to go to a version earlier than 4.4 you will also find solutions that Ionic 2 can use.
================= UPDATE Jan 2017 ================
There is a great starter project which has a number of app features built in, such as app settings, api connection, registration and login, welcome tutorial which can be found here https://github.com/driftyco/ionic-starter-super

Related

Ionic Framework and AngularJS

Let me preface these questions with the statement, "I'm not a web developer." Most of my work has been done in Python for data analytics.
Cutting right to it, I'm in a scenario where I'm learning web technologies such as HTML/CSS, JS, Ionic, and AngularJS in order to debug a pretty horrendous mobile app written by previous developers.
The app was built in the Ionic framework using Cordova plugins and AngularJS (yes, not the new Angular 6-7).
My questions are:
I have the newest version of Ionic installed on my computer that supports Angular 6-7. Will I have to roll it back to a previous version for it to support AngularJS?
Can my app encounter some serious problems in the next year (or less) if it is not rewritten using the new Angular?
1) You should not need to downgrade your version of Ionic, but will need to install the #ionic/v1-toolkit package.
2) This is more a subjective question. It is my understanding that v1 will remain stable for at least the near future. However, it is unlikely to have any more active development. You might encounter the usual issues with an older ecosystem, e.g. deprecated dependancies, out of date architecture patterns, lack of learning resources.
I have upgraded a few apps from v1 to v3/v4 at this point, and I VASTLY prefer the modern angular style, architecture, and functionality. So there is that. Typescript is very useful as well. The app will eventually need to be upgraded, and the upgrade from 1 to 2 is a total rewrite as Maheshivirus states. The more work you do on the Ionic 1 app, the more difficult the upgrade will be. Being ignorant of your circumstances, it might be worth considering upgrading first to limit development of technical debt and to better future proof your app.
The good news is they use the same cordova, so native functionality is very unlikely to be affected. Newer version of Ionic are faster, support lazy loading, have better components aesthetically, and work better as PWAs. If any of those aspects are of interest to you, that could sway your decision. See this link and this one for a bit more info. Second link indicates that no active work is being done on version 1 anymore.
Hope this helps.
- If you want to run Ionic 1 app then you should downgrade your installed ionic version to ionic 1.
-Ionic has updating day by day its better to update your ionic 1 projects to ionic 2+ because Ionic 2 is completely different from Ionic 1,as the language for framework has changed.Its no more angular 1,it's angular 2+ , TYPESCRIPT.
-At a high level, Ionic 2+ is a complete rewrite of the Ionic 1 project with Angular >= 2.x.

Is angular 1.x still relatable

Have a few projects in angular 1.x and wondering if its really necessary/efficient to move them to angular 4 / later.
Smaller dashboards would not be necessary as it is used internally by minimum number of people. But the bigger customer facing application (3 year old product ) is under the question, as new requirements are being developed.
According to surveys, Angular 1.x is still being used in many companies and the community is still active on making new libraries.
So is it worth shifting?
In my opinion you should leave those projects in Angular 1 and start using Angular 7 for newer Projects. Here is a good article comparing the two: https://www.uruit.com/blog/angular-1-vs-2-migrate/
If you have projects on angular1 developed, then those can be migrated to angular 7 module by module.
Means Using Current angular version, you can run your project in hybrid mode, where you can run angular 7 and angular 1 code together.
For clear understanding, please read these below links
1) https://angular.io/guide/upgrade
2) https://medium.com/contentsquare-engineering-blog/angularjs-to-angular5-upgrading-a-large-application-7e6fbf70bafa

Reverting to Ionic 1/AngularJS searching for stability in 2017

We're using Ionic 3 + Angular 4 to replace our native mobile apps, but are worried about stability and bugs encountered so far (virtualscroll, slides/keyboard inputs/etc).
We would like a backup app which is stable enough to put out to production soon. Is reverting to Ionic 1 a suitable solution? Or is it something that will be obsolete soon and with that its own issues.
When the bugs are ironed out in Ionic 3+, we'll be looking to submit that to production. I'm fully behind the Ionic project and know that some hacking needs to be done to achieve some things, as well as appreciating the good work they're doing to increase speed and native feel.
Our app is heavy on messages in scrolling lists, so virtualscroll is very much needed soon. Also, two of our 3-person team are very experienced in AngularJS, but not Angular 2+ at all, which is something that would speed up development right now. The existing documentation for Ionic 1 and AngularJS is also attractive right now for us.

How to easily switch to angular 2

So I learn angularJs not long ago, and I'm just getting started to get comfortable with it. But angular 2 is on the way and I have 2 major question:
1) Should I stop learning and working with angular 1 and start learning angular 2 instead?
I know a little about angular 2 and I know almost every thing has changed. So
2) What I know from angular 1 is any good in learning angular 2? Or should I learn angular 2 like it's a whole new framework? Is there any good way or guide to switch from angular 1 to 2?
Thanks in advance for your answers.
I learn angularJs not long ago
Then, this is the perfect time to start learning Angular 2, too. Starting a new language version while you have not already spend a lot of time on another one is a good choice in my opinion. However since Angular 2 is still in RC you should not completely leave learning Angular 1.x and start with Angular 2.
1) Should I stop learning and working with angular 1 and start
learning angular 2 instead?
No, even though the future of Angular framework seems to be Angular 2, this version is still in RC and building large apps using it would be a high risk.Angular 1.x compared to Angular 2 is more stable on this aspect. Angular 2 is constantly evolving, every few weeks there are totally new concepts included.
You should not stop learning Angular 1.x but, you should start learning Angular 2, too.
2) What I know from angular 1 is any good in learning angular 2?
Although there are a lot of changes like between these versions they still have similarities.For instance, in Angular 2 the concept of controllers does not exist, but they use Components. ng-if and ng-for directives from Angular 1.x look like *ngIf and *ngFor in Angular 2. The best resource to compare the two versions is their official website which you can find here here.
Is there any good way or guide to switch from angular 1 to 2?
Although you can still find very useful information about upgrading from Angular 1.x to Angular 2 on their official website
I would suggest that you treat Angular 2 as a completely new framework and start it from zero.Also the knowledge you already have about Angular 1.x will be helpful since there are concepts that have not changed that much. There are plenty of tutorials available online for free that you could use.
My favorite YouTube playlists are:
Angular 2 Start
Angular 2 Basics Course
Build Angular 2 Weather App
Well , This is the major question for all angular2 beginners who knows angular1 ... ,
Just imagine you don't know angularjs1 then Definitely you are more comfortable with angular2 ... The thing is Angular is the future that is the unwritten truth ... Definitely Angular1 is not going to die ...but It may be loose from the competition ... You have to consider following things to choose angular2 ...
Type Script (Great Coding Structure)
Componets (Great Library Support )
Rich Third party library Support
Creator the Giant (Google )
Finally You have to go with the future ... (Angular2)

New Project - Angular 1.4 or 2.0 [duplicate]

This question already has answers here:
New Project - Angular 1.4 or 2.0? [closed]
(2 answers)
Closed 6 years ago.
This is duplicate of
New Project - Angular 1.4 or 2.0? . However thats been asked 6 months back although Angular 2.0 is out now.
We are also about to start the new project with AngularJs with responsive web design to have it compatible with mobile browsers.
Which version ( 2.0 vs 1.4 ) would be recommended considering 2.0 is quite new and things may change or may not. Although I am quite keen to use 2.0 given its new features.
Your expert inputs would be appreciated.
A source for some indicators would be https://splintercode.github.io/is-angular-2-ready/ :)
So no.
On the other hand I've heard from companies clearly working with angular 2 already. Rather smaller ones.
I would compare my project timelines with the one from angular - and consider some delays as well. If your project runs more than 6 months: maybe. Depends on what features you implement and when you do that. UI related features: the later the better.
If that looks suiteable: why not.
But consider issues with the beta software. Some issues might not be easy to identify. For ex. I tried working with the new router and ran into issues with the components and controllers. If I needed that feature (a working routing) tomorrow then angular 2 would not be the best choice.
Beside angular 2 being released, some libraries and tools may need to adopt as well, which will require some time too.
And you can not realistically plan based on announcements. Sometimes features one waits for are just moved into the next release.
So it depends on how much space is for moving work around or delay some tasks. And of course how well your developers are trained to track down arising issues and identify the cause.
If you have a release date already I would not take the risk (speaking today 28th oct 2015). I would rather learn something about the business and then migrate (do a planned migration) once I understood more.
You may ask again tomorrow ;-D
Angular 1.5 is close to release (in Beta now). It will be production ready and have some great new features, like the "component" object.
https://github.com/angular/angular.js/blob/master/CHANGELOG.md
https://toddmotto.com/exploring-the-angular-1-5-component-method/
Start with Angular 1.5, write in TypeScript, follow all the latest best practices and your code will be close to being ready for Angular 2 upgrade.

Resources