Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 401
Sinandro Avatar asked Aug 12 '16 18:08

Sinandro


People also ask

Is Angular 2 better than AngularJS?

Angular 2 is more useful for developing mobile applications and includes higher performance speeds than AngularJS. JavaScript is easier to understand than TypeScript, making Angular 2 a more advanced and challenging framework for developers to use.

Is Angular 2 the same as angular?

Angular 2 is completely different from AngularJS. AngularJS had features like controllers, $scope, $scope variables, etc. However, in Angular 2, these features were replaced by new features namely components and directives.

Is Angular 2 and angular 8 are same?

Angular 2 and Angular 8 are not the same. They are different versions. While Angular 2.0 was the completely redefined and rewritten version of the basic Angular JS version, which was based on JavaScript. But with the developers at Google transitioned the framework to TypeScript.

Is angular going to be deprecated?

In January of 2018 we laid out our plans for the final releases of AngularJS before entering long-term support and last year, we extended the LTS due to the global pandemic until December 31, 2021. Well, friends, the time has come and we're no longer supporting AngularJS.


2 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
like image 167
etrupja Avatar answered Nov 15 '22 04:11

etrupja


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)

like image 22
Gopinath Kaliappan Avatar answered Nov 15 '22 06:11

Gopinath Kaliappan