add scroll service
This commit is contained in:
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();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user