angular / 15 / api / platform-server / rendermodulefactory.html

renderModuleFactory

function deprecated

Bootstraps an application using provided NgModuleFactory and serializes the page content to string.

Deprecated: This symbol is no longer necessary as of Angular v13. Use renderModule API instead.

renderModuleFactory<T>(moduleFactory: NgModuleFactory<T>, options: { document?: string; url?: string; extraProviders?: StaticProvider[]; }): Promise<string>

Deprecated This symbol is no longer necessary as of Angular v13. Use renderModule API instead.

Parameters
moduleFactory NgModuleFactory<T>

An instance of the NgModuleFactory that should be used for bootstrap.

options object

Additional configuration for the render operation:

  • document - the document of the page to render, either as an HTML string or as a reference to the document instance.
  • url - the URL for the current render request.
  • extraProviders - set of platform level providers for the current render request.
Returns

Promise<string>

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