Cookies concent notice

This site uses cookies from Google to deliver its services and to analyze traffic.
Learn more
Skip to main content
This site is no longer updated.Head to Angular.devHome
/

This is the archived documentation for Angular v17. Please visit angular.dev to see this page for the current version of Angular.

@angular/platform-server/init

Initializes the server environment for rendering an Angular application.

For example, it provides shims (such as DOM globals) for the server environment.

The initialization happens as a side effect of importing the entry point (i.e. there are no specific exports):

      
      import '@angular/platform-server/init';
    

The import must come before any imports (direct or transitive) that rely on DOM built-ins being available.

Entry point exports

No public exports.