W3cubDocs

/Angular

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.

API

function getPlatform(): PlatformRef | null;

Super-powered by Google ©2010–2025.
Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0.
https://angular.dev/api/core/getPlatform