However, many of us Angular JS developers have gotten used to 1.x, and even started liking it. Therefore, they did not find any requirement to make any drastic changes. And now Angular 2 is on the horizon. Although it carries the same name but with a higher version number. So the next logical step is to upgrade it and let me explain you why.
Why Angular 2?
First of all, it’s time to understand the concerns that AngularJS 2 wanted to address.
Mobile development: Regardless of the fact that Angular 1.x was meant for responsive application development, people were unable to find any mobile support. The good news is that AngularJS 2 has built-in support for mobile application development. In fact, it may quite interest you to know that the platform renders code differently for Web browsers and mobile browsers.
Performance: Due to the support for offline compilation and fast change detection, performance in Angular 2 is much improved. In addition to this, it is even compatible enough for dynamic loading and asynchronous templating that might eventually help in improving the page load and response times considerably. Besides, you can now use System.js as the universal loader to load the ES6 modules.
Directives: Angular 2 provides support for three types of directives. These are component directives, decorator directives, and template directives.
Improved Dependency Injection: It is a software design principle that helps to abstract the dependencies of an object outside of it and make such objects loosely coupled with each other. It may also interest you to know that the updated version has improved support for dependency injection. make dependency injection simple and easy to use and implement in Angular 2 is simply because of features like Modular development and component isolation.
Improved data binding: To bind data to a DOM element, all you have to do is just wrap the element inside a square bracket as shown in the code snippet below.
Browser support: The platform supports most of the modern-day browsers. These include: IE 9, 10, 11, Firefox, Chrome, Safari, Android 4.1 and Microsoft Edge
And the list goes on…
Tips to Make Learning Angular 2
Now I am sure you must have done enough flirting with Angular 2. And it’s time to glide across the room and say, “Hello”. Now I’d like to give you a pep talk, I would like to give few pieces of advice that will make your efforts more fruitful especially while working with the platform.
Get good with Git
– Many developers make this mistake of avoiding Git. No never do that! Angular 2 itself assumes that you are somewhat good with Git. And you don’t need to nail down the concept, simply learn the basics.
Learn Node and npm-
Angular 2 development is tightly hitched to Node and npm. So in case, if you are trying to dodge either of these, you are doing it wrong. It is always advisable to learn them both so that neither become a stumbling block when learning Angular 2.
Ignore UMD modules and Transpiling in the Browser
– Yes, it is quite true that Angular 2 code can be run using UMD modules, from a CDN, compiled in a browser at runtime. No matter how nice it is for sharing small Angular 2 code samples, but I wouldn’t pay it too much attention. Instead, I would rather use it for teaching and code sharing.
Use TypeScript-friendly code editor
Serious Angular 2 development requires a JS loader-
So, now that you know a thing or two about Git, Node, npm, TypeScript, the next major knowledge hurdle is to accept the fact that Angular 2 development will, in most cases, require the use of a modern JS loader. Just make sure that you don’t gloss over have a good understanding of whichever you use.