Statistics
The Highest Post







Statistics
Count 94
Avg 21.00
Min 21
Max 21
Angualr Top questions

Details



Peter Agyekum What is Angular 4 and how it differs from Angular 1.x? Angular 4 is a Javascript framework built around the concept of components, and more precisely, with the Web Components standard in mind. It was rewritten from scratch by the Angular team using Typescript (although we can use it with ES5, ES6, or Dart as well). Angular 4 is a big change for us compared to 1.x. Because it is a completely different framework than 1.x, and is not backward-compatible. Angular 4 is written entirely in Typescript and meets the ECMAScript 6 specification. The main differences are: Angular 4 is entirely component based. Controllers and $scope are no longer used. They have been replaced by components and directives. Angular 4 uses TypeScript. TypeScript will not be used in the browser directly. So the program code is compiled to JavaScript. This can be achieved with “Traceur”. The digest cycle from Angular 1.x has been replaced by another internal mechanism known as “Change Detection”. This feature, along with other improvements and tweaks, yields a considerable increase in performance. Unlike Angular 1.x where we can get most of the functionalities in angular.js file, Angular 4 follows module pattern. We need to import the functions ourself and export them when we need anywhere else. There are no more factory, service, provider in Angular 4. We need to use class for declaring a service.
Related Topics