Angular 9 Project Ivy: Top New Features.
Angular version 9 has arrived! It has introduced a new backward compatible compiler named Ivy, that has a host of benefits compared to its predecessor, View Engine.
Here are some of the best improvements of Angular v9.
Angular v9: What's New In It?
1.Reduced Bundle Sizes
The Ivy compiler shrinks the bundle sizes of apps through a technique called tree shaking, that detects and eliminates unused code. This ensures faster loading time and better performance. Small and large sized apps will benefit the most with bundle size decrease of upto 40%.
2. Easier Debugging
Angular 9 has efficient tools for spotting and removing errors. The Ivy runtime provides a new ng variable for debugging, when the app is run on development mode. With this, you can trigger change detection or retrieve component and directive instances, host elements, etc.
3. Faster Build Times
Angular Ivy enables faster compilation of applications, thereby drastically speeding up build times. This allows easy AOT compilation in the development stage without causing much delay in build times. Thus, AOT errors, which appeared previously only in the prod-mode builds, can be detected and debugged in the dev-mode builds itself.
4. Quicker Testing
Users can enjoy faster application test speeds of upto 40-50% with the upgraded TestBed in Ivy. Earlier, TestBed would recompile components in between each test run, irrespective of any component changes. Now, unless there is no manual overriding of components, TestBed doesn’t recompile between tests, thus increasing test speed.
5. Better Type-Checking
In Ivy, there are additional features for detecting and removing type errors. For this, two main flags are used – fullTemplateTypeCheck, that deeply checks your template for bugs and strictTemplates, that type checks by applying strictest Type System rules. These will help developers to catch bugs in the early stage of development process.
6. Component Harnesses
Angular component testing was traditionally done via CSS query selectors. But it had a problem – any change in a component’s internal structure affected the tests that were done on it. In v9, component test harnesses are employed where the test interacts with a component through an official API. This isolates the test from the component’s internal refactoring to give better readable and robust component tests.
Besides these improvements, Angular has enhanced internationalization, modified ng update and extended new choices for ‘providedIn’.
Well, the future of Angular looks really bright!
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?