填写这份《一分钟调查》,帮我们(开发组)做得更好!去填写Home

renderModule

Renders a Module to string.

查看"说明"...

renderModule<T>(module: Type<T>, options: { document?: string; url?: string; extraProviders?: StaticProvider[]; }): Promise<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 NgModuleFactorywith renderModuleFactoryinstead. If compiling with the Ivy renderer, this method is the recommended rendering method for platform-server.