Angularjs Difference Between 1 And 2


In Angular 1, views are HTML templates that are extended with custom elements 
and attributes called "directives".

In Angular 1, views are linked with view models that take the form of 
controllers and custom directives.  Angular 2 merges "controllers" and 
"directives" into a single concept of a "component".

Angular 1 automatically synchronizes DOM with view models when the view model 
changes.  It also allows us to associate function handlers with DOM events.  
Both of those methods are preserved and generalized in Angular 2.

Angular 1 also has the concept of "two-way databinding", where properties of the 
view model can be automatically changed to reflect changes to DOM properties.  
This approach is deprecated in Angular 2.

Angular 1 allows us to organize our view models into a hierarchy of "scopes" 
that partly mirror DOM structure.  This approach has proven to be problematic, 
and it is being dropped entirely in Angular 2.

In Angular 2, components should not define their dependencies.  Instead, each 
component should declare its dependencies, and let Angular inject these 
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License