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

PlatformState

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

Overview

      
      class PlatformState {
  constructor(_doc: any)
  renderToString(): string
  getDocument(): any
}
    

Description

Representation of the current platform state.

Constructor

      
      constructor(_doc: any)
    

Members

      
      renderToString(): string
    

Renders the current state of the platform to string.


      
      getDocument(): any
    

Returns the current DOM state.

Annotations

      
      @Injectable()