Platform

API for platform

API reference for Angular CDK platform

import {PlatformModule} from '@angular/cdk/platform';

Service to detect the current platform by comparing the userAgent strings and checking browser-specific global properties.

Properties
NameDescription

ANDROID: boolean

Whether the current platform is Android.

BLINK: boolean

Whether the current rendering engine is Blink.

EDGE: boolean

Whether the current browser is Microsoft Edge.

FIREFOX: boolean

Whether the current browser is Firefox.

IOS: boolean

Whether the current platform is Apple iOS.

SAFARI: boolean

Whether the current browser is Safari.

TRIDENT: boolean

Whether the current rendering engine is Microsoft Trident.

WEBKIT: boolean

Whether the current rendering engine is WebKit.

isBrowser: boolean

Whether the Angular application is being rendered in the browser. We want to use the Angular platform check because if the Document is shimmed without the navigator, the following checks will fail. This is preferred because sometimes the Document may be shimmed without the user's knowledge or intention