-
Notifications
You must be signed in to change notification settings - Fork 771
MatchMediaObservable : Upgrade from 2.0.0-beta.1 to 2.0.0-beta.3 #125
Comments
@maxime1992 - we will investigate. Thank you. |
This works using the following in "dependencies": {
"@angular/flex-layout": "^2.0.0-beta.3",
} |
@ThomasBurleson I tried to do that but I still have the same error. |
Are you importing the rxjs map operator? |
Are you importing the RxJS import 'rxjs/add/operator/map';
`` |
Here's what I import :
So yes I do have |
@maxime1992 - It is almost impossible to support issues with Plunkrs that our team can use to reproduce the issue. Unless you have a Plunkr that demonstrates this problem, I will be forced to close this issue.
|
@maxime1992 - My apologies sir. The issue is within flex-layout: MatchMediaObservable is not a real observable. It is a wrapper around the observable because we expose a
I think the API for MatchMediaObservable needs to some work. |
This will be fixed within the next 1-2 days. Thank you. |
@maxime1992 - see #133 |
@ThomasBurleson I usually try to help as much as I can by giving a Plunkr but as I really thought it was no big deal I didn't provide one this time. No problem, thank you for being so reactive 😄 Cheers 🍻 |
* rename token to 'ObservableMediaService' * rename MatchMediaObservableProvider to ObservableMediaServiceProvider * add method `.asObservable()` to MediaService fixes #125.
* rename token to 'ObservableMediaService' * rename MatchMediaObservableProvider to ObservableMediaServiceProvider * add method `.asObservable()` to MediaService fixes #125.
* rename token to 'ObservableMediaService' * rename MatchMediaObservableProvider to ObservableMediaServiceProvider * add method `.asObservable()` to MediaService fixes #125.
* rename token to 'ObservableMediaService' * rename MatchMediaObservableProvider to ObservableMediaServiceProvider * add method `.asObservable()` to MediaService fixes #125.
* rename token to 'ObservableMediaService' * rename MatchMediaObservableProvider to ObservableMediaServiceProvider * add method `.asObservable()` to MediaService BREAKING CHANGE: * use opaque token `ObservableMediateService` to inject instance of `MediaService` * use `MediaService::asObservable()` to get instance of observable ```js // RxJS import 'rxjs/add/operator/map'; @component({ ... }) export class MyComponent { constructor( @Inject(ObservableMediaService) media) { media.asObservable() .map( (change:MediaChange) => change.mqAlias == 'md' ) .subscribe((change:MediaChange) => { let state = change ? `'${change.mqAlias}' = (${change.mediaQuery})` : "" console.log( state ); }); } } ``` fixes #125.
* fix(matchMediaObservable): expose observable for rxjs operators * rename token to 'ObservableMediaService' * rename MatchMediaObservableProvider to ObservableMediaServiceProvider * add method `.asObservable()` to MediaService BREAKING CHANGE: * use opaque token `ObservableMediateService` to inject instance of `MediaService` * use `MediaService::asObservable()` to get instance of observable ```js // RxJS import 'rxjs/add/operator/map'; @component({ ... }) export class MyComponent { constructor( @Inject(ObservableMediaService) media) { media.asObservable() .map( (change:MediaChange) => change.mqAlias == 'md' ) .subscribe((change:MediaChange) => { let state = change ? `'${change.mqAlias}' = (${change.mediaQuery})` : "" console.log( state ); }); } } ``` fixes #125. * update(demo): fix imports for observable-media-service
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
I tried to upgrade from 2.0.0-beta.1 to 2.0.0-beta.3 and it now breaks saying that :
EXCEPTION: Uncaught (in promise): Error: Error in :0:0 caused by: this.media$.map is not a function TypeError: this.media$.map is not a function
My code :
I looked in release notes and changelog but couldn't find anything about breaking change.
The text was updated successfully, but these errors were encountered: