Open JLNNN opened 6 years ago
Update: It's working when installing npm i rxjs-compat
and using these packages manually. Can you fix this so we don't have to edit our node_module files?
Example _/nodemodules/ui-carousel/dist/src/ui-carousel/ui-carousel.component.js lines 4 and 5:
var Subject_1 = require("rxjs-compat/Subject");
require("rxjs-compat/add/operator/throttleTime");
This repo is not maintained for a rather long time now, it'd be best to just include the source as a component in your app, then you can choose not to use rxjs-compat since it adds quite a significant amount to your app size.
Change code in ui-carousel.component.ts
...
import { Observable } from 'rxjs/Observable';
import { Subject } from 'rxjs/Subject';
import { Subscription } from 'rxjs/Subscription';
import 'rxjs/add/operator/throttleTime';
...
this.subscriptions.add(this.nextSubject.throttleTime(this.speed).subscribe(() => {
if (!this.fade) {
this.slideLeft();
} else {
this.fadeLeft();
}
}));
this.subscriptions.add(this.prevSubject.throttleTime(this.speed).subscribe(() => {
if (!this.fade) {
this.slideRight();
} else {
this.fadeRight();
}
}));
...
############
to =>
############
...
import {Observable, Subject, Subscription} from 'rxjs';
import { throttleTime } from 'rxjs/operators';
...
this.subscriptions.add(this.nextSubject.pipe(throttleTime(this.speed)).subscribe(() => {
if (!this.fade) {
this.slideLeft();
} else {
this.fadeLeft();
}
}));
this.subscriptions.add(this.prevSubject.pipe(throttleTime(this.speed)).subscribe(() => {
if (!this.fade) {
this.slideRight();
} else {
this.fadeRight();
}
}));
...
Hey, thanks for your great module! :)
With the latest update of RxJS this seems broken:
Have a nice day & greetings from Germany! -- Julian