question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

feat: switch to CDK BreakpointsObserver

See original GitHub issue

We need to migrate to the CDK’s layout engine. This means the following:

  • ~Switch to using BreakpointsObserver in MediaMonitor~
  • Deprecate ObservableMedia/MediaService
  • Deprecate MatchMedia
  • Add server wrapper for BreakpointsObserver and MediaMatcher
  • Update the CDK layout engine as necessary

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:8
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ThomasBurlesoncommented, Jan 23, 2019

@angular/cdk BreakpointObserver will not replace @angular/flex-layout MediaObserver. MediaObserver is an enhanced version that notifies subscribers of activations for standard AND overlapping (lt-xxx, gt-xxx) breakpoints.

We are adding the following enhancements to @angular/flex-layout:

  • Ensure standard breakpoints mediaQueries are aligned with those in the CDK
  • Update MediaObserver
    • isActive() enhanced to support list of aliases to determine if any match
    • properly disconnects subscribers when destroyed

Note: Developers should use MediaObserver (not use MatchMedia) service to observe breakpoint activations! MediaObserver is the recommended service to use for application developers; MatchMedia should be considered a private service.

0reactions
angular-automatic-lock-bot[bot]commented, Sep 5, 2019

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Manage Breakpoints using BreakpointObserver in ...
Before creating the breakpoints, let's add the Angular Material components, which will install the Angular CDK library under the hood. ng add @ ......
Read more >
How To Detect Breakpoints Using the Angular CDK
Learn how to detect viewport size changes or matches against media queries using the BreakpointObserver and MediaMatcher services from the ...
Read more >
Angular CDK's BreakpointObserver. tldr; | by Preston Lamb
The Angular CDK's LayoutModule has a BreakpointObserver class that you can inject into a component, provide a breakpoint (or breakpoints) ...
Read more >
@angular/cdk | Yarn - Package Manager
Fast, reliable, and secure dependency management.
Read more >
KanokGB (@kanokgb) / Twitter
Turn on account notifications to keep up with all new content. ... How to detect viewport size with the help of #Angular cdk...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found