function
developer preview
Bootstraps an instance of an Angular application and renders it to a string.
renderApplication<T>(bootstrap: () => Promise<ApplicationRef>, options: { document?: string | Document; url?: string; platformProviders?: Provider[]; }): Promise<string>
bootstrap | () => Promise<ApplicationRef> | A method that when invoked returns a promise that returns an |
options | object | Additional configuration for the render operation:
|
Promise<string>
: A Promise, that returns serialized (to a string) rendered page, once resolved.
const bootstrap = () => bootstrapApplication(RootComponent, appConfig); const output: string = await renderApplication(bootstrap);
© 2010–2023 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://angular.io/api/platform-server/renderApplication