Thursday, February 1, 2018

Difference Between Angular 1 and Angular 2

Why Angular 2
Angular 2 is five times faster than angular 1.In Angular 2 Bootstrap is platform specific. For Mobile it call different bootstrap and for desktop different.

For Browser it used dart.
package:angular2/platform/browser.dart

For mobile it used (It reduce loading time)
Apache Cordova 

In Angular there was no mobile suppport it is made for responsive and two way binding app. Although there are some other libraries that can be used to run angular 1 on Mobile. Angular is madekeeping in mind mobile oriend architechture.

Angular2 used typescript to write code it is easy to code for java/.net developer.

No $scope in Angular 1, used this operator to access member variable.

Same code render different view for mobile and desktop.

Angular 2 is component based.

Injectors changed significantly. Child injectors is new thing in Angular 2.
There were bunch of directives in Angular 1. Angular 2 has only Component, Decorator and Template directive.
JSON based Route config is more easy to edit.

No comments:

Followers

Link