File tree Expand file tree Collapse file tree 3 files changed +8
-9
lines changed
Expand file tree Collapse file tree 3 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -151,7 +151,7 @@ export function bootstrapApplicationInternal(
151151 *
152152 * @publicApi
153153 */
154- export function createApplication ( options ?: ApplicationConfig ) {
154+ export function createApplication ( options ?: ApplicationConfig ) : Promise < ApplicationRef > {
155155 return internalCreateApplication ( createProvidersConfig ( options ) ) ;
156156}
157157
Original file line number Diff line number Diff line change @@ -144,12 +144,11 @@ export function platformServer(extraProviders?: StaticProvider[] | undefined): P
144144 * The root component passed into this function *must* be a standalone.
145145 *
146146 * ```ts
147- * @Component ({
148- * template: 'Hello world!'
149- * })
150- * class RootComponent {}
147+ * import { bootstrapServerApplication } from '@angular/platform-server';
148+ * import { ApplicationConfig } from '@angular/core';
149+ * import { AppComponent } from './app.component';
151150 *
152- * const bootstrap = bootstrapServerApplication(RootComponent , {
151+ * const bootstrap = bootstrapServerApplication(AppComponent , {
153152 * providers: [
154153 * {provide: BACKEND_URL, useValue: 'https://yourdomain.com/api'}
155154 * ]
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ import {
2323 ɵstopMeasuring as stopMeasuring ,
2424} from '@angular/core' ;
2525
26- import { platformServer , bootstrapServerApplication } from './server' ;
26+ import { bootstrapServerApplication , platformServer } from './server' ;
2727import { PlatformState } from './platform_state' ;
2828import { BEFORE_APP_SERIALIZED , INITIAL_CONFIG } from './tokens' ;
2929import { createScript } from './transfer_state' ;
@@ -298,10 +298,10 @@ export async function renderModule<T>(
298298 * import { renderApplication } from '@angular/platform-server';
299299 * import { bootstrapServerApplication } from '@angular/platform-server';
300300 * import { ApplicationConfig } from '@angular/core';
301- * import { RootComponent } from './app.component';
301+ * import { AppComponent } from './app.component';
302302 *
303303 * const appConfig: ApplicationConfig = { providers: [...] };
304- * const bootstrap = bootstrapServerApplication(RootComponent , appConfig);
304+ * const bootstrap = bootstrapServerApplication(AppComponent , appConfig);
305305 * const output = await renderApplication(bootstrap);
306306 * ```
307307 *
You can’t perform that action at this time.
0 commit comments