The latest version Angular 7.0 was introduced in October 2018 with significant upgrades and latest features including CLI prompts, Virtual Scrolling, Drag and Drop, and much more. Moreover, it aims at improving platforms with a focus on Angular Material 7 and Angular CLI 7.
The developers need to visit the official website where all the information and guidelines related to updates are available. If you want to update your version from Angular 6 to 7, only a single command is sufficient-
ng update @angular/clip @angular/core
So far, Angular 7 has received positive responses and reviews from worldwide developers. It is much faster in comparison to its previous version and provides a handy resource for using HTML templates.
Google has updated its Angular CLI or Command Line Interface to version 7.0.2 with the addition of new features. CLI can prompt users when they are using common commands such as ng-add, ng-new, and @angular/material to create a new project using SASS support.
Google also launches Schematics, which speeds up project development with the help of a new component, configuration, or framework. If you want to upgrade the CLI, then use the following command.
npm install -g @angular/cli@latest
Once this step is completed, the actual app development begins… Just type ng new and press enter.
The angular team identified the common errors that developers were committing in order to improve the application performance. The mistakes included using reflected metadata polyfill production, which only proves useful during the development process. The solution was to automate the removal of polyfills.ts files. Instead, it has been added as a build-up step while creating the application in JIT mode. It eliminated the polyfills from the production process by default.
Google has also taken an important step by setting bundle budgets size for new applications. This means it will warn the developers if they exceed the 2MB size of the initial bundle, and will show an error if it goes beyond 5MB. But the default warning size can be changed in the angular.json file. The angularjs developers will have to add a few things about the budget and then set the preferred warning and error size.
Angular Material and Component Development Kit
One of the key visual improvements in the Angular Material and Component Development Kit introduced in Angular 7 has been Material Design. Another important change is visible in Refresh and Visual Scrolling. It has helped a great deal in loading and unloading the Document Object Model (DOM) to create a large list of high-performing data. Developers can also benefit from the drag-and-drop facility via importing the DragDrop Module or scrolling module.
The Component Development Kit (CDK) offers the advantage of Virtual Scrolling by importing a Scrolling Module. It provides directives, reacting to scroll events. Virtual Scrolling helps in loading and unloading of elements from the Document Object Model or DOM that is based on visible elements.
It brings efficiency to stimulate all items, which needs to be rendered by equalizing the height of the container element and height of total elements that have to be rendered. It speeds up the scrollable lists
Drag and Drop
The Drag and Drop facility from Angular 7 offers a seamless module allowing developers to develop a drag-and-drop interface. It makes it easier for users to drag items within the list, and transferring items between lists, touch devices, drag handles, and much more. It also receives support from CDK for recording and transferring of lists known as moveItemInArray and transferArrayItem.
Angular Compatibility Compiler or ngcc
Angular Compatibility Compiler helps in replacing the node_modules complied with ngc to node_modules compiled with the new Ivy renderer. In short, the ngc-based node_modules compiler gets transformed into node_modules compiled with ngtsc. The transformation will help Legacy Ivy render the engine to use the legacy packages.
Updating the TypeScript from 2.7 to 3.1 Version
The TypeScript version has been updated from 2.7 to 3.1. The developers will have to use the latest version of TypeScript if they are developing apps using Angular 7.
Improved Accessibility of Selects
The accessibility of the Selects is improved in the application. The angular team makes use of a native select element in the mat-form field. It has improved the performance, usability, and accessibility of native select. The mat-select offers full control of presentation options.
Angular 7 also adds the current version RxJS 6.3.3 with changes. These changes help the developers to quickly identify the bugs and fix it to enhance the application performance. It also simplifies the process of backward compatibility by improving the modularity.
Some More Further Improvements
- Angular Console – A console that can be easily downloaded, allowing developers to start and run their projects on a local machine.
- @angular/fire- It is newly introduced as the new environment for npm and is the initial stable release for Angular.
- Native Script: The developers can work on a single project that can be installed on both web and mobile with NativeScript.
- StackBlitz – With Angular 7, we also see the introduction of StackBlitz 2.0, which combines Angular Language Service and more features such as tabbed editing.
Ivy, which is Angular’s next-generation rendering pipeline couldn’t find its place with the Angular 7 launch. This is because the project is still under progress.
The Angular 7 looks more promising and accessible with a focus on following the latest technological trends. The Angular team has tried to address every concern to boost app development, speed, and efficiency.