Skip to content

Instantly share code, notes, and snippets.

View Burgov's full-sized avatar

Bart van den Burg Burgov

View GitHub Profile
@Component({
selector: 'content-component',
template: '<div>Test {{ data }}</div>',
})
export class ContentComponent {
@Input() data: string;
}
@Component({
selector: 'child-component',
const t = new Date();
if (isPlatformBrowser(this.platformId)) {
const timeoutDelay = 60_000;
const events = ['keypress', 'click', 'wheel', 'mousemove', 'ontouchstart'];
const $onInactive = from(events.map(e => fromEvent(this.document, e))).pipe(
mergeAll(),
map(() => false),
timeout({ each: timeoutDelay, with: () => of(true) }),
repeat(),