viktor-shmigol / ng2-cable

Connect your Angular(2/4)/ionic(2/3) application with Rails ActionCable
https://ng2-cable-example.herokuapp.com
44 stars 14 forks source link

Add support for Angular 6 (rxjs 6) #19

Open ArielAleksandrus opened 6 years ago

ArielAleksandrus commented 6 years ago

Rxjs has now a new version, and subject is now imported directly from 'rxjs' Operators, like map, filter, switch map can be imported from 'rxjs/operator'

Problem is: even fixing imports, broadcaster.js fails on 'return this._eventBus.asObservable().filter(...)'

Error is:

this._eventBus.asObservable(...).filter is not a function
    at Broadcaster.push../node_modules/ng2-cable/broadcaster.js.Broadcaster.on
ArielAleksandrus commented 6 years ago

I've made a PR to fix it https://github.com/viktor-shmigol/ng2-cable/pull/20 Actually, I think it would be better to be on a branch or separate repository, like 'ng6-cable'

viktor-shmigol commented 6 years ago

@ArielAleksandrus I use angular 6.0.0 and rxjs 6.1.0. I do not have any issue at all. Here is my packages list:

@angular-devkit/build-angular         0.6.0
@angular/animations                   6.0.0
@angular/cli                          6.0.0
@angular/common                       6.0.0
@angular/compiler                     6.0.0
@angular/compiler-cli                 6.0.0
@angular/core                         6.0.0
@angular/forms                        6.0.0
@angular/http                         6.0.0
@angular/platform-browser             6.0.0
@angular/platform-browser-dynamic     6.0.0
@angular/router                       6.0.0
core-js                               2.5.5
rxjs                                  6.1.0
rxjs-compat                           6.1.0
ts-node                               6.0.3
typescript                            2.7.2

Also I am going to replace "brodcaster" with https://github.com/viktor-shmigol/ngx-global-events. So, there is no sence to merge your PR.

dustinblanchard commented 6 years ago

@viktor-shmigol do you have a timeframe for these changes? The peer dependencies are interfering with updating to the latest angular versions.