This is the archived documentation for Angular v6. Please visit angular.io to see documentation for the current version of Angular.

renderModuleFactory

Renders a NgModuleFactory to string.

See more...

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

Parameters

moduleFactory

Type: NgModuleFactory.

options

Type: { document?: string; url?: string; extraProviders?: StaticProvider[]; }.

Returns

Promise<string>

Description

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.