Angular 2 vs Angular 4 vs Angular 5

Angular 2, Angular 4 and Angular 5 are open source and fully TypeScript based client-side framework to develop a Single Page Application (SPA).
In this blog, we will explore the new features in Angular 2, Angular 4 and Angular 5.

As we all know Angular 2 was a significant upgrade from AngularJS or Angular 1.
But, it is not the case with Angular 4 and Angular 5.
Angular 4  = Angular 2 + Additional Features

Angular 5 = Angular 4 + Additional Features

Features of Angular 2

Angular 2 was introduced in the year 2016.
Angular 2 architectures is based on Component and Module.

Below are changes which were introduced in Angular 2

  • Component
  • Module
  • Template
  • Dependency Injection
  • TypeScript Support
  • Decorators
  • Template
Read:- Angular Interview Questions 

You may visit my earlier blog – Building block of an Angular 2 Application

What’s new in Angular 4?

Angular 4 added few extra features in Angular 2. Angular 4 was introduced in year 2017.

Let’s see the new features of Angular 4.

Faster  than Angular 2

Angular 4 applications consume less memory and loads faster than its older version i.e. Angular 2.

Inbuilt Animation Package

Developer can import animation in Angular application from its own package.

*ngIf with else

There are improvements in *ngIF and *ngFor in Angular 4.
Angular 4 has come up with else syntax along with ngIf in template.

<div *ngIf=”10==10; else mismatch”><h2>Number Matched</h2></div>
  <ng-template #mismatch><h2>Number Mismatched</h2></ng-template>

Support of TypeScript 2.1 and 2.2

Angular  4 has been designed to support recent versions of TypeScript. Angular 4 supports TypeScript 2.1 and 2.2

What’s new in Angular 5?

Angular 5 was introduced in November 2017.

List of Angular 5 features.

  • New Http Client
  • Support incremental compilation
  • Improved Form Validation
  • New Router Lifecycle Events
  • Support of RxJS 5.5.2

I will explore all Angular versions and their corresponding features in upcoming blogs.

You may like other blogs –

MVC Tutorial
Web API Tutorial
Is Angular JS different from Angular?

Interview Questions and Answers Series –

MVC Interview Questions and Answers
Web API interview questions and answers

Prev – Building Blocks of Angular
Next – List of Angular CLI Commands

Leave a Comment