W3cubDocs

/Angular

provideServerRendering

function

Sets up providers necessary to enable server rendering functionality for the application.

provideServerRendering(): EnvironmentProviders

Parameters

There are no parameters.

Returns

EnvironmentProviders: A set of providers to setup the server.

Usage notes

Basic example of how you can add server support to your application:

bootstrapApplication(AppComponent, {
  providers: [provideServerRendering()]
});

© 2010–2023 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://angular.io/api/platform-server/provideServerRendering