File

src/core/smart-screen.service.ts

Description

A service that monitors the screen size and publishes changes to subscribers

Example

Index

Properties
Methods

Constructor

constructor()

Methods

dimensionsAre
dimensionsAre(dimensions: Dimensions, size: string | ScreenSize, scaleFactor: number)
Parameters :
Name Type Optional Default value
dimensions Dimensions No
size string | ScreenSize No
scaleFactor number No 1
Returns : boolean

boolean

getDimensionsCategory
getDimensionsCategory(dimensions?: Dimensions, scaleFactor: number)
Parameters :
Name Type Optional Default value
dimensions Dimensions Yes
scaleFactor number No 1
Returns : string

string

windowIs
windowIs(size: string | ScreenSize)

Returns true if the current window size greater than or equal to the given string.

Parameters :
Name Type Optional Description
size string | ScreenSize No

possible values: xs, sm, md, lg

Returns : boolean

Properties

Static Readonly allScreenSizes
Type : []
Default value : ['xs', 'sm', 'md', 'lg', 'xl']
windowSize
Type : BehaviorSubject<WindowSize>
Default value : new BehaviorSubject<WindowSize>( this.screenSize )

result-matching ""

    No results matching ""