Do you want to hire an expert Angular developer?
Angular 12 is out with great updates and features. This Angular latest version is a step in the right direction towards adopting the “Ivy Everywhere” approach. It unlocks great potential for the platform with the move to Ivy, its compilation, and rendering pipeline. View Engine now is a thing of the past as Angular 12 transitions away from View Engine (now deprecated).
New Angular projects will not support Protractor. If you are looking to build an Angular 12 application, partner with AngularJS Development Company
Along with this, Angular 12 brings massive improvement in styling, Nullish Coalescing, and Legacy i18n Message IDs as some other important features making this release a stable one. In this blog, we will walk you through Angular new version features and changes that the Angular team has brought along.
What are the new features of angular 12?
Angular 12 is the step in the Angular revolution.
- The Angular team is finally deprecating View Engine to make Ivy Everywhere a reality.
- View Engine is deprecated and will be completely removed in the next major release in the future.
- Current libraries with View Engine will continue to function with Ivy apps. However, with Angular 12 it is about time that library authors start planning to transition to Ivy.
Migrating from legacy i18n message IDs
Legacy message-ids come across with issues relating to whitespace and the organizing formats and ICU expressions utilized in the i18n framework. In order to overcome this matter, the Angular team is making the standard message-id design stronger and better. This configuration will reduce the superfluous translation invalidation as well as related retranslation cost in applications where translations don’t organize due to whitespace changes.
Since Angular version 11, new tasks leverage new message ids and they presently have the tooling to move existing ventures with existing translations. Angular 12 provides essential tools to migrate the translations.
Angular syncs well with tools such as Cypress, WebdriverIO, and TestCafe. The future of Protractor seemed in doubt. However, moving forward Protractor will not be included in Angular projects. While the team is reviewing feedback, more news on the fate of Protractor is expected soon, probably in the next update.
Deprecating support for IE11
Internet Explorer is undoubtedly in its last leg as the support for IE continues to dwindle. It is a challenge to support IE when building for the web. With Microsoft 365 team to stop support for IE11 and Microsoft removing IE from its ecosystem now.
Angular is taking a step in the right direction supporting legacy browsers like Internet Explorer. A new deprecation warning message will be displayed for IE11 in this new version of Angular. Support will be totally removed by version 13.
This new version provides a nullish coalescing operator (??) to write cleaner code for conditionals. Update your Angular app and leverage the operator to make the process of conditional statements easy and simple. This TypeScript operator has been operational for a while now, and getting it into Angular improves its usability for thousands of developers using Angular.
Improvements around Styles
There are several changes and improvements made around styling in Angular which includes support for inline SASS in the styles field for component decorator without including any inlineStyleLanguage option to your angular.json file.
Support for Tailwind CSS also comes with this version. Considering the exponential growth and popularity of the Tailwind community, this is the right move by the Angular team.
Updates in Angular 12 include the following:
- For the language service, they have added a command to add a template file.
- Making minified UMDs essential.
- Redirected Source files.
- Component style resources.
- New migration that casts the value of fragment nullable.
- DOM elements are correctly removed when the root vies have been removed.
- Remove unused methods from DomAdapter.
- Strict Null checks.
- App-initializer has been changed.
- Support for disabling animations. Angular 12 can disable animations through BrowserAnimationsModulewithconfig.
- Addition of the emit event option.
- Custom router outlet implementations are permitted.
- Implementing the append all() method on Httpsparams.
Minimum and maximum validators are introduced.
- Exporting a list of HTTP status codes.
- Patch adding the API to retrieve the template type check block.
- Support for the compiler to transform component style resources.
- Enhanced support for Hot Module Replacement (HMR).
- Ng_package does not generate minified UMDs anymore.
- Incorporate harnesses to test all Angular Material components.
- Enhanced logging and reporting due to CLI readability.
- Support Webpack 5 by starting a new module federation feature.
- Updated TypeScript support.
- New context option to the compiler-cli to supply arbitrary data in a type-safe way.
- Refined and fine tune control in routerLinkActiveOptions.
- Permission for custom router outlet implementations.
- Minimize legacy by reducing framework overheard.
FAQs About Angular 12
How to upgrade to the latest version Angular 12
- Prior to update: There aren’t currently any changes needed before moving between these versions.
- During the Update:
- Run ng update @angular/core@12 @angular/cli@12 to bring you to the latest version 12 of Angular.
- Angular now requires TypeScript 4.2. ng update will update you automatically.
- IE11 support has been deprecated.
- You can no longer use Angular with Node.js version 10 or older
- After the Update: There aren’t currently any changes needed after moving between these versions.
Why should I migrate to Angular 12?
Support for Angular v11 will end in a year. There are several amazing benefits of moving to Angular 12 features such as Nullish Coalescing, Legacy i18n Message IDs and styling. The deprecation of the View engine and incorporation of the Ivy ecosystem are considered major enhancements in version 12.
What is the difference between Angular 11 and 12?
The obvious differences between the features of Angular 11 and Angular 12 are: style enhancements,Nullish Coalescing, typescript support, strict CLI mode, and more.
Should I use angular 12?
Angular 12 offers many improvements in performance, compilers, language services, form validation and much more. The deprecation of the View engine and addition of the Ivy ecosystem is certainly one of the major enhancements considered in version 12. Along with this, In addition, Angular 12 includes style improvements, Nullish Coalescing, and shifting from Legacy i18n Message IDs as some other important features that make this release a stable one. In addition, Angular 12 offers many bug fixes, affecting the browser, kernel, router, language function, and more.
Angular 12 has arrived with a suite of improvements to its performance, language service, compiler, form validation, and much more. Additionally, Angular 12 features several bug fixes to ensure smooth functioning and simplifying the Angular development process.
Table of Contents