Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
Hi folks! Today we want to talk about one cool and growing technology its name – Angular 2. What is more interesting that it has no stable version yet, but many companies and developers have already using it for doing projects.
Hi folks! Today we want to talk about one cool and growing technology its name – Angular 2. What is more interesting that it has no stable version yet, but many companies and developers have already using it for doing projects. To be precise current version today is 2.0.0-rc.6, and the final version is just a half-ready. Please check the current version yourself to know about current updates. So we want to talk a bit about this framework and its difference from the previous version, also we will compare it with React somehow, and summarizing this will say why you should use it, or not.
Let’s run through the new features and add some information about its main differences from Angular 1.*.
– There is no two-way data-binding in the core, that created problems in previous version, but you can use this option if it’s needed.
– Different languages to use including, ES5, ES6.
– There is no controllers and $scope anymore. Controllers are replaced with “Components” so Angular 2 is component based.
– There is no ng-app;
– Structural directives syntax is changed. ng-repeat is replaced with *ngFor
– local variables are defined using hash(#) prefix;
– Angular 2 uses camelCase syntax;
– Angular 2 directly uses the valid HTML DOM element properties and events. There is no built-in directives like – ng-href, ng-src, ng-show, ng-hide, ng-click, ng-blur etc. Now you have href, src and hidden properties to get the same output.
– ng-bind replaced by [property] – valid HTML DOM element property;
– ng-model replaced by [(ngModel)];
– the only way to define a service is class (instead of Factory, Service, Provider, Constant, Values);
– you have the different way of using Dependency Injection (code differences);
– @RouteConfig{(…}) for routing configuring;
– ng-view replaced with <router-outlet>;
– etc.
3. Angular 2 became mobile oriented. It is made with keeping in mind mobile oriented architecture. For example, you can use NativeScript and Angular 2 to write your app, and get higher performance than you had in first version.
We are looking forward to meeting you on our website blog.soshace.com