add scroll service

This commit is contained in:
X4Lo committed 2025-01-27 06:15:42 +01:00
1 parent 3bb0935db9
commit 2a904b4878
2 files changed
+19

No files matched your search

@@ -0,0 +1,17 @@
import { Injectable } from '@angular/core';
import { Subject } from 'rxjs';
@Injectable({
providedIn: 'root',
})
export class ScrollService {
private scrollEndSubject = new Subject<void>();
// Observable for subcomponents to subscribe
scrollEnd$ = this.scrollEndSubject.asObservable();
// Emit scroll end event
notifyScrollEnd(): void {
this.scrollEndSubject.next();
}
}