Angular 4.0
Angular 1 = AngularJS
Angular 2+ = Angular

What is new in Angular
- Faster change detection
- Multi-directional bindings
- Component-based design
- Ahead of Time compiler w/cli
- Object-oriented & functional paradigm at the core
- Typescript
- Class Suger
Components = Directives
- Component Directives – These will create reusable components by encapsulating logic in JavaScript, HTML or an optional CSS style sheet.
- Decorator Directives – These directives will be used to decorate elements (for example adding a tooltip, or showing/hiding elements using ng-show/ng-hide).
- Template Directives – These will turn HTML into a reusable template. The instantiating of the template and its insertion into the DOM can be fully controlled by the directive author. Examples include ng-if and ng-repeat.
AOT compiling reduced my initial load time from seconds to milliseconds
What Angular 4 Brings
Less than you think
But it doesn't break much
-
core: Because all lifecycle hooks are now interfaces the code that uses 'extends' keyword will no longer compile. Introduced by (ee747f7).
To migrate the code follow the example below:
Before:
@Component() class SomeComponent extends OnInit {}After:
@Component() class SomeComponent implements OnInit {}Based on our research we don't expect anyone to be affected by this change.
-
RootRenderer cannot be used any more, use RendererFactoryV2 instead. Introduced by (ccb636c).
Note: Renderer can still be injected/used, but is deprecated.
Universal
Universal, the project that allows developers to run Angular on a server, is now up to date with Angular again, and has been adopted by the Angular team. This release now includes the results of the work from the Universal team over the last few months. The majority of the Universal code is now in platform-server. To learn more about this change, take a look the new renderModuleFactory method, or Rob Wormald’s Demo Repository. More documentation is forthcoming.
Improved AOT
We’ve made changes under to hood to what AOT generated code looks like. These changes should reduce the size of the generated code for your components by more than half in some cases. Read the Design Doc for the View Engine updates.
Angular 4.0
By James Brinkerhoff
Angular 4.0
- 797