renderModule
function
stable
Bootstraps an application using provided NgModule and serializes the page content to string.
API
function renderModule<T>(
moduleType: Type<T>,
options: {
document?: string | Document | undefined;
url?: string | undefined;
extraProviders?: StaticProvider[] | undefined;
},
): Promise<string>;renderModule
Promise<string>Bootstraps an application using provided NgModule and serializes the page content to string.
@paramoptions
{ document?: string | Document | undefined; url?: string | undefined; extraProviders?: StaticProvider[] | undefined; }Additional configuration for the render operation:
document- the document of the page to render, either as an HTML string or as a reference to thedocumentinstance.url- the URL for the current render request.extraProviders- set of platform level providers for the current render request.
@returns
Promise<string>Jump to details