ScreenOrientationService

Reads and watches the screen orientation type and angle. Supports programmatic orientation locking for mobile applications.

API Variant
TypeScriptexample.ts
import { ScreenOrientationService } from '@angular-helpers/browser-web-apis'

# Methods

MethodSignatureReturnsDescription
getSnapshotgetSnapshot(): OrientationInfoOrientationInfoPublic method getSnapshot.
watchwatch(): Observable<OrientationInfo>Observable<OrientationInfo>Public method watch.
locklock(orientation: OrientationLockType): Promise<void>Promise<void>Public method lock.
unlockunlock(): voidvoidPublic method unlock.
LCP N/A
CLS N/A
INP N/A