Angular 2 or 4 or 5 [duplicate] - angularjs

This question already has answers here:
What is Angular 4 and from where I can learn more about it?
(6 answers)
Closed 5 years ago.
I am posting this question to get some opinion from fellow developers on which version of Angular to start to learn when migrating from AngularJS to Angular.
I have been working with AngularJS 1.3.7. I have realized that AngularJS 1 is pretty old now and there have been more than significant changes in Angular 2 and higher versions. Also Angular 5 just come out.
I have plans of learning Angular and currently confused with which version to start. I am assuming that Angular 2 is currently trending in market now followed by Angular 4(I might be wrong though).
Should I take a sequential approach and start from Angular 2 and then higher versions or is is safe to jump directly to Angular 4 or 5 without having any Angular 2 knowledge ? Or probably my question should be, can I learn Angular 4+ directly without have any prior knowledge of Angular 2 ?
A lot of companies that have now been using AngularJS for years are still using it, and don't have immediate plans to migrate to 2+. So there's marketability, plus the inevitable requirement of knowing both as an Angular developer.
I know my question is broad and might get some downvotes and red flags, but I am curious to hear from folks who have experienced the transition from 2 to 4+.
Also, I wanted to know about the key differences between AngularJS 1 and Angular 2+. Are they completely different, or will some of the knowledge transfer?
And lastly, I would like to know some of the good resources/tutorial to learn Angular.

They are basically the same. The Angular project moved to Semantic Versioning, which means every breaking change results in the major version to be increased.
Angular 5 is just a newer version of Angular2.
Just use the newest.
http://angularjs.blogspot.co.at/2016/10/versioning-and-releasing-angular.html?m=1

You should use the newest version of Angular for new projects and for learning.
Difference between versions
The difference between Angular v1 and Angular v2/3/4/5+ is drastic, as the platform was completely rewritten in TypeScript, and with different conventions.
The difference between Angular v2/3/4/5+ is simply that breaking changes were released between each major revision; however, they're still the same platform and tutorials / documentation will generally remain applicable between these 4 versions.
Semantic Versioning
Angular now follows the semantic versioning scheme. Patch releases (e.g. 5.0.X) will not change the functionality, minor releases (e.g. 5.X.0) will contain only additive changes, and breaking changes (e.g. X.0.0) are reserved for major releases.
Originally, the rewrite of AngularJS was called "Angular 2" by the team, but this led to confusion among developers. To clarify, the team announced that separate terms should be used for each framework with "AngularJS" referring to the 1.X versions and "Angular" without the "JS" referring to versions 2 and up.

Related

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

Is there a way to develop Angular 6 and AngularJS1.6 applications at same machine? [duplicate]

This question already has an answer here:
Running Angular and AngularJS frameworks side by side
(1 answer)
Closed 4 years ago.
I try to find a way to develop both Angular 6 app and AngularJS 1.6 app at same machine.
Here are my situation. I need work on 2 projects, one is brand new one that will use Angular 6 and Angular material design. another project is an old project that I just took over and it's using AngularJS 1.6. Is that possible I can develop both apps on my work laptop or I have to use Virtual machine for one of the apps? I really appreciate your help.
They are clearly different frameworks. You can probably go without issues on the same machine.
The trick if you get into trouble for some common node_modules dependencies, is to use local packages, not global ones. But this should already be the default behavior for the dependencies.
What would require a bit more careful setup is if you need to develop both on Angular 2 and Angular 7 for instance, if you installed some of the libraries globally (which is probably the case if you use angular-cli).
Even though, it's achievable anyway : https://blog.angularindepth.com/angular-5-or-angular-6-yes-please-d71b08b5e59b

What is the relationship btw "Angular 4" and angulardart?

I am very confusing btw upcoming angular4 and angulardart. Is angular4 just for angular-ts? What about angulardart upcoming versions and future? thanks a lot!
PS:
I am just interested in if angular4 and angulardart have any relationships or not. And wondering If angular4 and future angulardart will share any codes, features, designs, etc... I knew the difference btw angular2 and angulardart, and my question mainly focuses on the relationship btw angular4 and angulardart. Thanks.
Since about beta.17 Angular Dart and Angular TS are developed independently (see also the link above from PierreDuc).
While Angular 1.x and Angular >= 2 are entirely different frameworks, from version 2 on, a new major version only indicates that breaking changes were introduced according to http://semver.org/
See also What is Angular 4 and from where I can learn more about it?
For differences between Angular TS and Dart see also What's the difference between AngularJS 2 and Dart?

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