This is the archived documentation for Angular v5. Please visit angular.io to see documentation for the current version of Angular.

BrowserModule

npm Package @angular/platform-browser
Module import { BrowserModule } from '@angular/platform-browser';
Source platform-browser/src/browser.ts

Overview

      
      class BrowserModule {
  constructor(parentModule: BrowserModule)
  static withServerTransition(params: {...}): ModuleWithProviders
}
    

Description

The ng module for the browser.

Static Members

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

Configures a browser-based application to transition from a server-rendered app, if one is present on the page. The specified parameters must include an application id, which must match between the client and server applications.

Constructor

      
      constructor(parentModule: BrowserModule)
    

Annotations

      
      @NgModule({
    providers: [
        BROWSER_SANITIZATION_PROVIDERS,
        { provide: ErrorHandler, useFactory: errorHandler, deps: [] },
        { provide: EVENT_MANAGER_PLUGINS, useClass: DomEventsPlugin, multi: true },
        { provide: EVENT_MANAGER_PLUGINS, useClass: KeyEventsPlugin, multi: true },
        { provide: EVENT_MANAGER_PLUGINS, useClass: HammerGesturesPlugin, multi: true },
        { provide: HAMMER_GESTURE_CONFIG, useClass: HammerGestureConfig },
        DomRendererFactory2,
        { provide: RendererFactory2, useExisting: DomRendererFactory2 },
        { provide: SharedStylesHost, useExisting: DomSharedStylesHost },
        DomSharedStylesHost,
        Testability,
        EventManager,
        ELEMENT_PROBE_PROVIDERS,
        Meta,
        Title,
    ],
    exports: [CommonModule, ApplicationModule]
})