function
Renders a Module to string.
renderModule<T>(module: Type<T>, options: { document?: string; url?: string; extraProviders?: StaticProvider[]; }): Promise<string>
module | Type | |
options | object |
Promise<string>
document
is the full document HTML of the page to render, as a string. url
is the URL for the current render request. extraProviders
are the platform level providers for the current render request.
If compiling with the ViewEngine renderer, do not use this in a production server environment. Use pre-compiled NgModuleFactory
with renderModuleFactory
instead. If compiling with the Ivy renderer, this method is the recommended rendering method for platform-server.
© 2010–2021 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v12.angular.io/api/platform-server/renderModule