• Overview
@angular/core

getPlatform

function
stable

Returns the current platform.

API

function getPlatform(): PlatformRef | null;

getPlatform

Returns the current platform.

@returnsPlatformRef | null

Usage Notes

This function should not be used when multiple platforms are enabled (e.g., SSR) as it will also return null.

Jump to details