Angular 9 was published
on February 7, 2020. Version 9 passes all applications to do the Ivy compiler
and runtime by default. Angular has been updated to run with TypeScript 3.6
and 3.7. In increase to 100 of bug fixes, the Ivy compiler and runtime
allows many advantages:
That is one of the largest updates to Angular we have done in the earlier 3 years and we are charged for all of the ways it allows developers to build more reliable applications and provide to the Angular ecosystem
How
to update to version 9
Proceed to this website update.angular.io for complete
knowledge and guidance. To have the biggest update practice, we suggest your
initial update to the last release of Angular 8.
First, update to the newest
version of 8
ng update @angular/cli@8 @angular/core@8
Now, update to 9
ng update @angular/cli @angular/core
Ivy
Version 9 runs
all applications to do the Ivy compiler and
runtime by default. In increasing to hundreds of bug fixes, the
Ivy compiler and runtime allows many advantages:
·
Smaller bundle
sizes
·
Faster testing
·
Great debugging
·
Updated CSS class
and style coupling
·
Fixed type
checking
·
Fixed build
errors
·
Fixed build
times, allowing AOT on by default
·
Bettered
Internationalization
Smaller bundle sizes
The Ivy compiler
has done created to extract parts of Angular that aren’t doing done via tree-shaking and to make
less code for every Angular component.
With those
changes, little apps, and large apps can see the most exciting size savings.
·
Little apps that
don’t accept various Angular features that can help most from tree-shaking.
·
Big apps with
several components can help most from the controlled facility size.
·
Medium-sized apps
should observe bundle sizes that are on par or slightly less considering all
benefit less from tree-shaking and don’t have sufficient components to truly
leverage fewer factories.
Faster testing
Before, TestBed would recompile all components in the running
of each test, although of whether there were any modifications done to
components (for example, through overrides).
In Ivy, TestBed doesn’t recompile parts in tests except a
component has been manually revoked, which enables it to withdraw recompilation
between the grand majority of tests.
With this update,
the framework’s core taking tests are about 40% faster. We would require users
to see their own application test speeds to be around 40–50% faster.
Better debugging
Ivy gives you
larger tools to debug your applications. When running an application in Dev
Mode with the Ivy runtime, we now offer the new ng object for
debugging.
·
You can ask
Angular for a way to occurrences of your components, directives, and more
·
Manually call
methods and update the state
·
When you require
to see the results of change disclosure, you can trigger change detection
with applyChanges
Ivy also increases the total trace for debugging problems such as the ExpressionChangedAfterItHasBeenCheckedError. Before the stack trace could be unhelpful:
By Ivy, you view an extra helpful
stack trace that enables you to jump straight to the template instruction with
the appearance that has changed.
Improved CSS class and style binding
The Ivy compiler
and runtime executes changes for handling styles. Previously, if an application
accepted fencing solutions for a style, those styles would destructively
succeed each other. With Ivy, the styles are mixed in an expected way.
Improved type checking
The Angular the compiler can examine more of the types of your application, and it can apply
extra strict rules. These articles will help you and your team find bugs
beginning in the development process.
Improved build errors
The new Ivy the compiler is not only faster and allows the more effective type of safety, but
it also offers each of the error messages easier to read.
Improved build times, enabling Ahead-of-Time compiler by default
Thanks to Ivy’s
new construction, we’ve made important changes to the compiler’s execution.
We hold our
compiler’s achievement in terms of the overhead on
top of a plain TypeScript collection of an application. For our documentation
app (angular.io), this overhead subtracted from 0.8x to 0.5x with Ivy, an
increase of approximately 40%.
Improved internationalization (i18n)
Internationalization
must be a core feature of Angular, where you could develop your application
once per locale and take really optimized and limited applications. In 9.0,
we’re executing this active by leading the build-time i18n changes following in
the build method. This variation allowed us to get it up to 10 times faster.
No comments:
Post a Comment