Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fireloop broken with Angular7 /RXJS 6.4? #149

Open
2 of 5 tasks
ElHupeke opened this issue Apr 1, 2019 · 1 comment
Open
2 of 5 tasks

Fireloop broken with Angular7 /RXJS 6.4? #149

ElHupeke opened this issue Apr 1, 2019 · 1 comment

Comments

@ElHupeke
Copy link

ElHupeke commented Apr 1, 2019

What type of issue are you creating?

  • Bug
  • Enhancement
  • Question

What version of this module are you using?

  • 2.1.0-beta.n (2.1 Beta n)
  • Other

Please add a description for your issue:

After upgrading to Angular7, the newest RXJS was installed. Now the .subscribes won't work anymore. Loading of RealTime module, gives an error.
Is it possible to make adjustments for this?

@ElHupeke
Copy link
Author

ElHupeke commented Apr 1, 2019

Seems to it is fixed now:

In socket.connections.ts changed:

Added import:
import { share } from 'rxjs/operators';

changed:
this.sharedObservables = {
sharedOnConnect: this.subjects.onConnect.asObservable().share(),
sharedOnDisconnect: this.subjects.onDisconnect.asObservable().share(),
sharedOnAuthenticated: this.subjects.onAuthenticated.asObservable().share(),
sharedOnUnAuthorized: this.subjects.onUnAuthorized.asObservable().share(),
};

to:

this.sharedObservables = {
  sharedOnConnect: this.subjects.onConnect.asObservable().pipe(share()),
  sharedOnDisconnect: this.subjects.onDisconnect.asObservable().pipe(share()),
  sharedOnAuthenticated: this.subjects.onAuthenticated.asObservable().pipe(share()),
  sharedOnUnAuthorized: this.subjects.onUnAuthorized.asObservable().pipe(share()),
};

real.time.ts:

added:

import { share } from 'rxjs/operators';

Changed:

private sharedOnReady: Observable = this.onReadySubject.asObservable().share();
to:
private sharedOnReady: Observable = this.onReadySubject.asObservable().pipe(share());

FireloopRef:

added:

import 'rxjs/add/observable/merge';

Data is loaded again......

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant