<div (scroll)="onScroll($event)">
onScroll(event: any) {
const value= event.target;
}
Here instead of type "any" ,I need to put the type of the event. Can anyone help me with this.
It would be Event
as a type.
onScroll(event: Event) {
const value= event.target;
}
Fired at the Document or element when the viewport or element is scrolled, respectively. https://drafts.csswg.org/cssom-view/#event-summary
An event can be triggered by the user action e.g. clicking the mouse button or tapping keyboard, or generated by APIs to represent the progress of an asynchronous task. https://developer.mozilla.org/en-US/docs/Web/API/Event
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With