API reference for Angular CDK platform
import {PlatformModule} from '@angular/cdk/platform';
Services
Platform
Service to detect the current platform by comparing the userAgent strings and checking browser-specific global properties.
Properties
Name | Description |
---|---|
|
Whether the current platform is Android. |
|
Whether the current rendering engine is Blink. |
|
Whether the current browser is Microsoft Edge. |
|
Whether the current browser is Firefox. |
|
Whether the current platform is Apple iOS. |
|
Whether the current browser is Safari. |
|
Whether the current rendering engine is Microsoft Trident. |
|
Whether the current rendering engine is WebKit. |
|
Whether the Angular application is being rendered in the browser. |
Functions
getSupportedInputTypes | |
---|---|
Returns | |
Set<string>
|
The input types supported by this browser. |
supportsPassiveEventListeners | |
---|---|
Checks whether the user's browser supports passive event listeners. See: https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md |
|
Returns | |
boolean
|
|
normalizePassiveListenerOptions | |
---|---|
Normalizes an |
|
Parameters | |
options AddEventListenerOptions
|
Object to be normalized. |
Returns | |
AddEventListenerOptions | boolean
|
|
supportsScrollBehavior | |
---|---|
Check whether the browser supports scroll behaviors. |
|
Returns | |
boolean
|
|
getRtlScrollAxisType | |
---|---|
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
|
|