Flex-layout: @angular/flex-layout/flex-layout"' has no exported member 'ObservableMedia'

Created on 14 Jan 2019  路  7Comments  路  Source: angular/flex-layout

Bug Report

What is the expected behavior?

Project works as is, even after upgrading @angular/flex-layout from 7.0.0-beta.22 to 7.0.0-beta.23.

What is the current behavior?

error TS2305: Module '"../../../node_modules/@angular/flex-layout/flex-layout"' has no exported member 'ObservableMedia'.

What are the steps to reproduce?

Providing a StackBlitz (or similar) is the best way to get the team to see your issue.

What is the use-case or motivation for changing an existing behavior?

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Also upgraded Angular to 7.2.0 and TypeScript to 3.2.2.

Is there anything else we should know?

Most helpful comment

ObservableMedia was deprecated in 7.0.0-beta.19 and removed in 7.0.0-beta.23. Please use the nearly identical MediaObserver instead and consult the docs and CHANGELOG

All 7 comments

ObservableMedia was deprecated in 7.0.0-beta.19 and removed in 7.0.0-beta.23. Please use the nearly identical MediaObserver instead and consult the docs and CHANGELOG

Thanks, media$ rather than asObservable() did the trick with that one

No problem, though be advised that we may add/revert to the asObservable syntax in the future (with proper deprecation path notice in advance), because we realized the media$ transition isn't the most graceful.

Might be worth changing the documentation here https://github.com/angular/flex-layout/blob/master/docs/documentation/ObservableMedia.md to reflect this change.

Thank you both SamuelMarks and CaerusKaru both. Solved my problem perfectly.

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._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

drew-moore picture drew-moore  路  4Comments

mhosman picture mhosman  路  3Comments

spottedmahn picture spottedmahn  路  5Comments

mackelito picture mackelito  路  3Comments

intellix picture intellix  路  4Comments