API reference for Angular CDK layout
import {LayoutModule} from '@angular/cdk/layout';
Services
BreakpointObserver
Utility for checking the matching state of @media
queries.
Methods
isMatched | |
---|---|
Whether one or more media queries match the current viewport size. |
|
Parameters | |
value string | readonly string[]
|
One or more media queries to check. |
Returns | |
boolean
|
Whether any of the media queries match. |
observe | |
---|---|
Gets an observable of results for the given queries that will emit new results for any changes in matching of the given queries. |
|
Parameters | |
value string | readonly string[]
|
One or more media queries to check. |
Returns | |
Observable<BreakpointState>
|
A stream of matches for the given queries. |
MediaMatcher
A utility for calling matchMedia queries.
Methods
matchMedia | |
---|---|
Evaluates the given media query and returns the native MediaQueryList from which results can be retrieved. Confirms the layout engine will trigger for the selector query provided and returns the MediaQueryList for the query provided. |
|
Parameters | |
query string
|
|
Returns | |
MediaQueryList
|
|
Interfaces
BreakpointState
The current state of a layout breakpoint.
Properties
Name | Description |
---|---|
|
A key boolean pair for each query provided to the observe method, with its current matched state. |
|
Whether the breakpoint is currently matching. |
Constants
Breakpoints
const Breakpoints: { XSmall: string; Small: string; Medium: string; Large: string; XLarge: string; Handset: string; Tablet: string; Web: string; HandsetPortrait: string; TabletPortrait: string; WebPortrait: string; HandsetLandscape: string; TabletLandscape: string; WebLandscape: string; };