The latest version of Angular is now generally available. Angular v12 moves the language closer to “Ivy Everywhere,” an approach to transition the Angular ecosystem to the Ivy compiler.
As of this release View Engine is officially deprecated and will be fully removed in a future release. Current libraries that use View Engine will still work with Ivy apps, but the Angular team recommends that library authors start transitioning to Ivy, explained Mark Techson, developer advocate on the Angular team, in a blog post.
Another transition in Angular v12 is the move away from legacy i18n message IDs. According to Techson, these legacy message IDs can cause issues based on whitespace, formatting templates, and ICU expressions. The new message ID format will be more resilient and intuitive and will reduce unnecessary translation invalidation and retranslation cost in applications where translations don’t match.
Since Angular v11, new projects have been automatically configured to use the new message IDs. In addition, there is now tooling for migrating existing projects with existing translations, Techson explained.
For this release the Angular team has also been working to determine the future of Protractor, which is an Angular testing framework. It is still reviewing feedback and at the moment will not include it in new projects. Instead it will work to get developers to adopt alternatives, and is working with Cypress, WebdriverIO, and TestCafe on that effort.
Other new features in Angular v12 include:
- Nullish coalescing in Angular templates
- Documentation and video guide improvements
- Support for inline Sass in the styles field of the @Component decorator
- Running ng build now defaults to production
- Strict mode enabled by default in the CLI
- Ivy-based Language Service moved from opt-in to on by default
- Experimental support for Webpack 5
- Support for TypeScript 4.2
- Deprecation of support for IE11