bootstrapServerApplication
function
stable
Bootstraps an instance of an Angular application for the server platform.
API
function bootstrapServerApplication(
rootComponent: Type<unknown>,
options: ApplicationConfig,
): ServerApplicationBootstrapFn;
bootstrapServerApplication
ServerApplicationBootstrapFn
Bootstraps an instance of an Angular application for the server platform.
@paramoptions
ApplicationConfig
Extra configuration for the bootstrap operation, see ApplicationConfig
for
additional info.
@returns
ServerApplicationBootstrapFn
Usage Notes
The root component passed into this function must be a standalone.
import { bootstrapServerApplication } from '@angular/platform-server';import { ApplicationConfig } from '@angular/core';import { AppComponent } from './app.component';const bootstrap = bootstrapServerApplication(AppComponent, { providers: [ {provide: BACKEND_URL, useValue: 'https://yourdomain.com/api'} ]});
Jump to details