Cookies concent notice

This site uses cookies from Google to deliver its services and to analyze traffic.
Learn more
Skip to main content
Say hello to Angular's future home!Check out Angular.devHome
/

BrowserModule

Exports required infrastructure for all Angular apps. Included by default in all Angular apps created with the CLI new command. Re-exports CommonModule and ApplicationModule, making their exports and providers available to all apps.

      
      class BrowserModule {
  static withServerTransition(params: { appId: string; }): ModuleWithProviders<BrowserModule>
}
    

Static methods

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

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

Deprecated Use APP_ID instead to set the application ID.

Parameters
params { appId: string; }

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

Returns

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

Providers

Provider
      
      ...BROWSER_MODULE_PROVIDERS
    
      
      ...TESTABILITY_PROVIDERS