Performing manual Angular Ivy migrations
In this section, we will walk through optional migrations that put our application on track for future Angular versions. We will discuss fine-tuning initial navigation, optimizing change detection with NgZone
, and improving the type safety of our unit tests.
Managing initial navigation
The following legacy values for the initialNavigation
option for RouterModule.forRoot
are removed by Angular Ivy version 11:
true
false
'legacy_enabled'
'legacy_disabled'
Angular Ivy version 11 also deprecates the 'enabled'
value but introduces the following new values:
'enabledBlocking'
'enabledNonBlocking'
(default)
'enabledBlocking'
is equivalent to 'enabled'
and is recommended for server-side rendering using Angular Universal. This value starts the initial navigation process before Angular creates an instance of the root component of our...