Wed Oct 21 2015
First official announcement of Angular 2.0 was made at the ng-conference in October, 2014. There the team Angular said, they are not going to release a new major update of AngularJs, but an entirely rewritten framework with no backward compatibility.
This step is taken not only to improve the current angular in terms of features and performance, but also because they are more interested in future web; i.e. web components and ES6; which is a phenomenal thing about this beautiful framework.
This article is devided into two sections. One contains the specialities of AngularJs 2.0; whereas in the second part I tried to answer few very common questions related to the new framework.
Though Angular 2.0 is enriched with hell lot of features, but here I will describe only those which is really extraordinary and forced the team to rewrite the framework.
As things have been moved to MVC to web components, routers are also redesigned. The child router will convert each component of the application into a smaller application by providing it with its own router. It will help encapsulate entire feature sets of an application.
Previously in case of large Angular apps, for modular code structure I had to use require.js; but as Angular 2.0 by default supports ES6, things are auto modular. No need for a third party library. However currently as browsers are not supporting ES6 properly, you will need system.js
The DI in Angular has been improved a lot in 2.0, where they introduced child injectors, instance scope etc. More on this can be found in the upcoming tutorials of Void Canvas.
Many of us may have faced the necessity where you wanted to provide the controller or directive at runtime. Don’t worry, you are all set to fall in love with 2.0.
As Angular 2.0 templates are using ES6 module spec, so template compiling will be asynchronous from now on.
A service called diary.js has been introduced to Angular 2.0, which will help you to log the application’s performance. This can be very useful to find the flaws of your own code and make the app more performant.
Yes you can. But things will be more ugly I guess. Moreover Angular 2.0 is future, so it’s better to use ES6 like syntaxes through typescript.
If we look at a lot of different apps today we would probably see the same thing as the Angular team has seen in the 1600+ projects used internally at Google: controllers aren’t really needed. But yeah, directives still have the controllers.
No $scope and jqLite; that’s for sure.
“It’s really hard for us to build a bridge to a city that doesn’t exist yet.” – Brad Green, Engineering Director, Angular core team. Right now there is no specific way, but we can see ofter angular 2 is fully created.
SHARE THIS ARTICLE
Sat Mar 01 2014This is a continuation of my CSS3 loader snippet collection series. I've provided spinning css3 animation loader in the part 1 of this series and here in part 2, I'm providing various square type loading