renderModuleFactory
将 NgModuleFactory渲染为字符串。
Renders a NgModuleFactoryto string.
renderModuleFactory<T>(moduleFactory: NgModuleFactory<T>, options: { document?: string; url?: string; extraProviders?: StaticProvider[]; }): Promise<string>
参数
moduleFactory | NgModuleFactory | |
options | object |
返回值
Promise<string>
说明
document 是要渲染的页面的完整文档 HTML,为字符串形式。url 是当前渲染请求的 URL。extraProviders 是当前渲染请求的平台级提供者。
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.