Closed JustACodeMonkey closed 6 years ago
There aren't too many changes required to make this work with Angular 6.
interrupt.ts (modules/core/src)
import {Subscription} from 'rxjs';
eventtargetinterruptsource.ts (modules/core/src)
import { Observable, Subscription, fromEvent, merge } from 'rxjs';
import { filter, throttleTime } from 'rxjs/operators';
const fromEvents = events.split(' ').map(eventName => fromEvent<any>(target, eventName, opts));
this.eventSrc = merge(...fromEvents);
this.eventSrc = this.eventSrc.pipe(
filter(innerArgs => !this.filterEvent(innerArgs))
);
if (this.throttleDelay > 0) {
this.eventSrc = this.eventSrc.pipe(
throttleTime(this.throttleDelay)
);
}
...I updated the tslint.json file by removing the restriction to import the root of rxjs, and package.json accordingly (to update to newest version of Angular and RxJS).
Any plans on supporting RxJS 6 anytime soon?
See the workaround https://github.com/HackedByChinese/ng2-idle/pull/94
Can we get an updated version for angular 6??
I'm submitting a ... (check one with "x")
Current behavior
Building an application with Angular 6 / Angular 6 CLI fails because Angular 6 required rxjs 6+.
Expected behavior
The application build should not fail
Minimal reproduction of the problem with instructions
Create an Angular 6 application with the Angular 6 CLI. Add @ng-idle/core to the dependencies section of package.json and try to run your application. You will see a series of errors in the format...
Module not found: Error: Can't resolve 'rxjs/Observable' in [.../node_modules/@ng-idle/core/src]
What is the motivation / use case for changing the behavior?
Our applications use @ng-idle/core and @ng-idle/keepalive and we're upgrading to Angular 6
Please tell us about your environment:
Mac OS (newest), VSCode (newest), npm, nodejs
@ng-idle version: 2.x
2.0.0-beta.15
Angular version: 2.x
Angular 6.0.0-rc.5
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
All
Language: [all | TypeScript X.X | ES6/7 | ES5] We use TypeScript 2.7.x
Node:
node --version
= 8.11