MCPcopy Create free account
hub / github.com/angular/components / constructor

Method constructor

src/cdk/layout/media-matcher.ts:26–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24 private _matchMedia: (query: string) => MediaQueryList;
25
26 constructor() {
27 this._matchMedia =
28 this._platform.isBrowser && window.matchMedia
29 ? // matchMedia is bound to the window scope intentionally as it is an illegal invocation to
30 // call it from a different scope.
31 window.matchMedia.bind(window)
32 : noopMatchMedia;
33 }
34
35 /**
36 * Evaluates the given media query and returns the native MediaQueryList from which results

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected