What is Angular 2?
- In late 2014, according to google’s announcement, Angular 2 would be a complete rewrite of AngularJS, and they even created a new language “AtScript”(AtScript is a superset of ES6) that was meant to be used for writing Angular 2 applications. Than after Microsoft started supporting annotations to their TypeScript language, and so it emerged as the language for the development of the Angular 2 framework itself.
- Angular2 is written in TypeScript. Angular 2 and TypeScript are bringing true object oriented web development to the mainstream, in a syntax that is strikingly close to Java 8.
- Typescript is Microsoft’s extension of JS that comes with powerful type checking abilities and object oriented features.
- It provides advanced auto-completion, navigation, and refactoring. Having such tools is almost a requirement for large projects.
Features and Advantages
- Angular 2 is faster and easier than Angular 1.
- Angular2 allows for Ahead of time (AOT) compilation means AoT compilation without any changes of the application code. With AOT, the browser downloads a pre-compiled version of the application. The browser loads executable code so it can render the application immediately, without waiting to compile the app first.
- It supports latest the version of browsers and also supports old browsers including IE9+ and Android 4.1+.
- Angular 2 is not an MVC framework, but a component-based framework. In Angular 2 an application is a tree of loosely coupled components.
- Angular 2 is mainly focused on mobile apps. It uses server side rendering for faster mobile views.
- If an application is a heavy load, then Angular 2 keeps it fully UI responsive.
- Being worked on component based approach, It uses dependency injection for decreasing code length.
Despite being new framework and having less online community support, Angular 2 has no such minus points.