{ "id": "api/platform-browser/BrowserModule", "title": "BrowserModule", "contents": "\n\n
\n
\n
\n \n API > @angular/platform-browser\n
\n \n
\n \n
\n

BrowserModulelink

\n \n \n \n \n \n
\n \n \n\n
\n \n
\n

Exports required infrastructure for all Angular apps.\nIncluded by default in all Angular apps created with the CLI\nnew command.\nRe-exports CommonModule and ApplicationModule, making their\nexports and providers available to all apps.

\n\n \n
\n \n \n \n
\n\nclass BrowserModule {\n static withServerTransition(params: { appId: string; }): ModuleWithProviders<BrowserModule>\n}\n\n\n \n \n\n
\n\n\n \n\n \n \n \n \n\n \n\n
\n

Static methodslink

\n \n \n\n \n \n \n \n \n \n \n \n \n \n\n \n\n \n \n
\n
\n

\n withServerTransition()\n \n link

\n \n
\n
\n

Configures a browser-based app to transition from a server-rendered app, if\none is present on the page.

\n\n
\n
\n \n\n static withServerTransition(params: { appId: string; }): ModuleWithProviders<BrowserModule>\n\n \n\n
Parameters
\n \n \n \n \n \n \n \n \n \n
\n \n params\n { appId: string; }\n

An object containing an identifier for the app to transition.\nThe ID must match between the client and server versions of the app.

\n\n
\n\n \n
Returns
\n

ModuleWithProviders<BrowserModule>: The reconfigured BrowserModule to import into the app's root AppModule.

\n\n \n\n\n \n\n \n
\n
\n\n \n
\n\n \n\n \n\n\n \n\n\n \n \n
\n

Providerslink

\n \n \n \n \n \n \n \n \n \n \n \n \n \n
Provider
\n \n BROWSER_MODULE_PROVIDERS\n \n
\n
\n\n \n\n \n \n\n\n \n\n\n
\n
\n\n\n" }