July 20, 2020 By Angelina Eillott Category: Angular Development

Angular 9.1 has arrived following the Angular 9.0 release. The upgrade to the Type-script-based frameworks has its applications transferred to the runtime and Ivy compiler by default. All these changes bring a performance boost to the Angular compatibility compiler (ngcc) and Ivy compiler. However, Angular developers could find more reasons to work with this frontend framework since it showcases more upgrades and changes to the command-line interface (CLI), bug fixes, and other minor changes. The Angular Development Agency can offer stability, performance, and cost-effective solutions to frontend development for customers. Read on to know more about Angular version 9.1.

At a glance: Angular Features

  • Typescript 3.8
  • Improved Build Speed
  • CLI Component Generator Option
  • Enhanced HTML and expression syntax
  • TSLint 6.1 by default
  • Support for Grep and invert Grep

Angular Compatibility Compiler Improvements (ngcc)

Before version 9.1 came by, the ngcc compilation involved all of the Angular library dependencies. However, today the Angular libraries get along well with the Ivy compiler with inputs from the ngcc tool. With this, the speed of the ngcc has improved while allowing the compilation of multiple packages. Angular dev teams wanting to focus on mongorepository-styled workspace layout can benefit from the improved build speed too.

TypeScript 3.8

Angular 9.1 has introduced TypeScript 3.8. Besides, the framework supports previous versions such as 3.6 and 3.7. Some of the primary features of TypeScript 3.8 are as follows as below,

i. ECMAScript private fields

  • # triggers the Private Fields
  • TypeScript Modifiers follows ‘hard privacy’

ii. Top Level await

  • await” function performs at the top of the module.
  • Previously “await” needed support from ‘async’ function.

iii. Type-only imports and exports

  • Type annotations and type declarations use new command import as prompted by this new feature
  • Type contexts need the export type
  • TypeScript erases both remnants at runtime

iv. Call hierarchy

v. Convert to template string

Also Read : [Xamarin Development- How does it get you more with enterprise app development?]

New CLI Component Generator Option

Display Block is a new upgrade to the CLI Component Generator Option. Initially most DOM elements received that component as “inline” by default. Now on, all angular developers use components displayed as display:block style automatically as they create a new component. The command appears as below,

ng generate component my-component –display Block

First set the key in your angular.json to true

[email protected]/angular:component.displayBlock

However, you can also use the following command,

ng config [email protected]/angular:component.displayBlock true

Modified version of End-to-End tests

While testing end-to-end processes, you can use grep and invert Grep options in the Protractor builder. This extends the flexibility while choosing a test type.

ng e2e –grep searchTerm

TSLint 6.1 by default

To be able to understand TypeScript functionality and readability errors, you can use TSLint 6.1 analysis tool. As you use the latest version of the tool, you must ensure, you are using the Angular 9.1 version. Use it using the following command.

ng update @angular/cli –migrate-only tslint-version-6

Ivy Compiler Upgrades

strictTemplates option is a new upgrade in Angular 9.1 version for Ivy compiler. It can be leveraged to do short and fast testing. In case, if Ivy has strict interventions, developers can use strict Literal Types to ease the checks.

Improved HTML & Expression Syntax Highlighting

Angular experts can make use of a TypeScript-like format. As you use IDE or VSCode and Language service extension, the format helps you syntax highlighting expressions in the templates. The Syntax highlighting can also be added to the inline HTML templates.

Directionality Query API

The compatibility with Right to Left locales is important as you build a single app with internationalization. It is now easier to make queries at runtime for the current direction.

Some more changes to Angular 9.1

  • Compatible with new compiler and runtime
  • Enhanced performance
  • Bug fixes

Ways to get the latest features

Use the following command to implement the newer version of Angular and get the best features and bug fixes.

ng update @angular/cli @angular/core

Summing up

These are all the latest features and improvements meant to transform the Angular development and also frontend development. Angular 9.1 also has a better compatibility rate with the new compiler and runtime. Bytes Technolab passionately follows all changes in the frontend development and brings the best of technology engineering to website and application development.

Share with :

Total Ratings 0/5 (0)

Rate Us!

Thanks For Rating Us