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

ServerTransferStateModule

npm Package @angular/platform-server
Module import { ServerTransferStateModule } from '@angular/platform-server';
Source platform-server/src/transfer_state.ts

Overview

      
      class ServerTransferStateModule {
}
    

Description

NgModule to install on the server side while using the TransferState to transfer state from server to client.

Annotations

      
      @NgModule({
    providers: [
        TransferState, {
            provide: BEFORE_APP_SERIALIZED,
            useFactory: serializeTransferStateFactory,
            deps: [DOCUMENT, APP_ID, TransferState],
            multi: true
        }
    ]
})