Angular 12 brings improved performance and new features for modern web development

Okay so here we are again with new Angular 12 features. but first drumrolls 🎉 for the new Angular update. Like every year Angular team comes up with a new update and features of angular during this time of year.

These updates will be really helpful if you are using Angular 11 or Angular 10 or Angular material.

Without talking (writing) too much let’s go ahead and what are the new updates we will get in the new angular update.

Nullish Coalescing

This one is my favorite update. from now on you can add nullish coalescing in your HTML templates.

 Developers can now use this on templates for complex conditions.

Previously we used to write conditions like this –  

{{distance !== null && distance !== undefined ? distance : calculatedistance() }}

which becomes like this now – 

{{ distance ?? calculatedistance() }}

start updating updating your complex conditions in templates with this.

 

Inline Sass support

Yes you heard it right, now angular supports inline sass. angular compiler didn’t allow this previously but from after upgrading it to version 12 it will support inline sass.

Angular CDK and material has also updated their sass modules. make sure to switch from node-sass to sass

Default build with prod flag

There could be times when you run ng build without prod flag and push that code to production. but from now on ng build comes with a default prod flag which will help the developers to save time and build their code in an easier way.

IE11 Support

Angular is adapting web ecosystem and it is removing support for legacy browsers.

Other features  

  • Strict mode is enabled default for the users in CLI.
  • Experimental support has been added for webpack 5.
  • Typescript version has been upgraded to 4.2.
  • Contributor’s guide to improve angular documentation.

Leave a Reply

Your email address will not be published. Required fields are marked *