Introduction Of AngularJS 2.0 And Differences Between AngularJS 1.0 And AngularJS 2.0

Here we are looking at the differences between Angular 2.0 and Angular 1.0. AngularJS generally refers to:

  • Angular 2.0 is totally different from 1.0; it is completely rewritten.
  • Angular 2.0 comes with TypeScript (ECMA 6 &at Script).
  • Angular 2.0 means components are the basic building blocks for UI.
  • In Angular 2.0 there are no controllers; create only directives.
  • Improved Dependency Injection with TypeScript Generics.
  • Angular 2 says Goodbye to $scope with Ultra-Fast Chance Detection.

Angular 2.0

  • Angular 2 is written entirely in TypeScript and meets the ECMA Script 6 specification{ TypeScript = ES6 + Types + Annotations}
  • Angular 2 is entirely component based. Controller and $scope are no longer used.
  • Supports several languages including plain JavaScript, TypeScript and Dart. Also supports both object-style data structure.





Angular js 2.0(Designed For the Future)

  • All code in Angular 2 is being written in es6.
  • Angular JS apps are built around data-binding between DOM and JS objects.
  • Simplifying the syntax by using declarative-style ES6+ with annotations.
  • At Script is a superset of Es6 and it’s being used to develop Angular 2.0
  • Improved Templating, Data Binding and Routing.





Now we will see all that we have said about Angular2.0.

Angular2.0

  • Component-Based approach of development.
  • Directive still playing major role.
  • Dependency Injection Improved.
  • Lambdas with TypeScript.
  • Forms & Validation Improved.
  • New Router and form validations.
  • Change detection watcher with component level change detection.
  • Code using ES6 in TypeScript with the features of At script.

We are going to take a look at the installation of Angular2.0

  • Different ways to write Angular 2.0 App.
  • Set up our development environment with package JSON.
  • Install Angular 2.0 libraries using Node with bower.
  • Configure TypeScript with tsconfig.json.
  • Write First Angular Component.
  • Bootstrap Angular App “Hello World”.

Angular 2.0 Languages work with given language.

  • TypeScript
  • Dart
  • Ecma6
  • Ecma5

Type Script

  • Microsoft’s ES6.
  • Strong-typing for larger code bases & teams.
  • Runtime support via Assert.js.
  • Opt-in strong-typing via compiler.



As we can see, es5, es6 and TypeScript are supported JavaScript-based syntax but Dart does not support Java Script; if we are coding in Dart it uses Dart extension.

Next Recommended Readings