mean-expert-official / fireloop.io

Modern Real-Time Platform by MEAN Expert
Other
172 stars 36 forks source link

Fireloop broken with Angular7 /RXJS 6.4? #149

Open ElHupeke opened 5 years ago

ElHupeke commented 5 years ago

What type of issue are you creating?

What version of this module are you using?

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 commented 5 years ago

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