This commit updates the logic to detect a situation when hydration support was enabled only on the client. If that happens, Angular produces a warning in a console with a link to the error guide. PR Close #49743
1.3 KiB
@name No hydration info in server response @category runtime @shortDescription No hydration info is present in server response.
@description This error occurs when hydration is enabled on the client, but the server response doesn't contain special serialized information about the application that hydration logic relies on.
This can happen when the provideClientHydration() function is included in the client
part of the application configuration, but it missing in the server part of the configuration.
In applications with the default project structure (generated by the ng new),
the provideClientHydration() call is added either into the providers array of
the main AppModule (which is imported into the server module) or into a set of
providers that are included into both client and server configurations.
If you have a custom setup where client and server configuration are independent
and do not share common set of providers, make sure that the provideClientHydration()
is also included into the set of providers used to bootstrap an application on the server.
More information about hydration can be found in this guide.
@debugging
Verify that the provideClientHydration() call is included into a set of providers
that is used to bootstrap an application on the server.