What Is New in Angular 13.0
Angular 13 delivers a significant update focused on developer experience, performance, and modernizing the framework's foundation. The key changes are summarized in the table below.
| Category | Key Changes |
|---|---|
| New Features | View Engine is deprecated, full Ivy adoption; Persistent build cache |
| Improvements | ES2017 as the new compilation target; Modern Angular Package Format (APF) |
| Developer Experience | RxJS 7.4 as default; Simplified dynamic component creation; Enhanced test APIs |
| Deprecations | View Engine is deprecated; Node.js versions older than 12.20.0 |
Why is Ivy now the default and mandatory?
Angular 13 completely removes the legacy View Engine compilation and rendering pipeline, making Ivy the only option. This matters because it unifies the ecosystem, eliminating the complexity of supporting two different compilation systems.
All internal tools have been updated to use Ivy, and the Angular Compatibility Compiler (ngcc) is no longer needed. In practice, this means faster build times and a simpler mental model for developers, as all libraries must now be published in Ivy-compatible format.
What build and performance enhancements were introduced?
Two major performance features land in this release: a persistent build cache and a modernized compilation target. The persistent disk cache is a new CLI feature that dramatically speeds up subsequent builds and production builds by default.
Applications now compile to ES2017 by default instead of ES2015. This upgrade allows the CLI to output more modern code, which can lead to smaller bundle sizes and improved performance in modern browsers that support these features.
How has the Angular Package Format evolved?
The Angular Package Format (APF) has been updated to a more modern and simplified version. The new APF uses the latest Node.js package export functionality with subpath patterns defined in the package.json "exports" field.
This change replaces the deep import paths we used to need. It results in cleaner, more explicit package APIs and better tooling support. Library authors need to update their build process to output this new format.
What improvements were made to the component API?
Creating dynamic components is now significantly easier. The ViewContainerRef.createComponent method has been simplified, no longer requiring the use of an injected component factory resolver.
You can now create a component with a single line: viewContainerRef.createComponent(MyComponent);. This is a great quality-of-life improvement that removes boilerplate and makes the intent of the code much clearer.
Were there any updates for testing?
Yes, the framework testing APIs received notable improvements. The TestBed now better tears down test environments after each test, automatically cleaning up any components that were created during the test execution.
This automatic cleanup helps prevent cross-test contamination, making tests more isolated and reliable. It's a welcome change that reduces the chance of flaky tests caused by improper cleanup in afterEach blocks.
FAQ
Do I need to do anything to upgrade my app to use only Ivy?
If you were already using Ivy in Angular 12, your upgrade should be smooth. The main impact is for library creators, who must ensure they are publishing Ivy-compatible packages. Applications using View Engine will need to be migrated to Ivy first.
What is the immediate benefit of the new persistent build cache?
You'll see significantly faster build times on development machines and in CI/CD pipelines. The cache stores results from previous builds on disk, so operations like ng build and ng test can skip recompiling unchanged code.
Why did the compilation target change to ES2017?
This change allows Angular to generate more modern JavaScript by default. The output code can use newer language features native to modern browsers, which often results in smaller bundle sizes and better runtime performance without needing custom polyfills.
How does the new APF format affect my library imports?
You should no longer use deep imports (e.g., @my-lib/component/component). The new "exports" field in the package.json file defines the public API, and tools like TypeScript will now enforce using these approved entry points.
Is the simplified createComponent method backwards compatible?
The old method that required a ComponentFactory is still available but is now deprecated. The new signature is a drop-in replacement that is much simpler. You can refactor your code to use the new method without breaking existing functionality.