<link rel="stylesheet" href="/styles-2YLIEYNE.css">
This site uses cookies from Google to deliver its services and to analyze traffic.
More details
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
Name Description

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.

getSupportedInputTypes (): Set<string>
Returns
Set<string>

The input types supported by this browser.

supportsPassiveEventListeners (): boolean

Checks whether the user's browser supports passive event listeners. See: https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md

Returns
boolean

normalizePassiveListenerOptions (options: AddEventListenerOptions): AddEventListenerOptions | boolean

Normalizes an AddEventListener object to something that can be passed to addEventListener on any browser, no matter whether it supports the options parameter.

Parameters

options

AddEventListenerOptions

Object to be normalized.

Returns
AddEventListenerOptions | boolean

supportsScrollBehavior (): boolean

Check whether the browser supports scroll behaviors.

Returns
boolean

getRtlScrollAxisType (): RtlScrollAxisType

Checks the type of RTL scroll axis used by this browser. As of time of writing, Chrome is NORMAL, Firefox & Safari are NEGATED, and IE & Edge are INVERTED.

Returns
RtlScrollAxisType

Azure & Blue theme selected.