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

renderModuleFactory

npm Package @angular/platform-server
Module import { renderModuleFactory } from '@angular/platform-server';
Source platform-server/src/utils.ts
      
      function renderModuleFactory<T>(moduleFactory: NgModuleFactory<T>, options: {
    document?: string;
    url?: string;
    extraProviders?: StaticProvider[];
}): Promise<string>;
    

Description

Renders a NgModuleFactory to 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.