The solution for “Scroll,Position” can be found here. The following code will assist you in solving the problem.

import { HostListener } from ‘@angular/core’;

@ViewChild(‘curtain’) divCurtain: ElementRef;

export class ComponentX {
@HostListener(‘window:scroll’, [‘$event’]) onScrollEvent($event) {
console.log(window.pageYOffset); = window.pageYOffset.toString().concat(‘px’);

ngOnInit(): void { }

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

inline scripts encapsulated in