• Overview
@angular/core

getPlatform

function

Returns the current platform in the browser environment. In the server environment, returns null. If you need access to the platform information, inject PlatformRef in your application.

API

  
    function getPlatform(): PlatformRef | null;
  
  

getPlatform

Returns the current platform in the browser environment. In the server environment, returns null. If you need access to the platform information, inject PlatformRef in your application.

@returnsPlatformRef | null
Jump to details