How to listen to the window scroll event in a VueJS component?

Posted by Prem Tiwari | Updated on

How to listen to the window scroll event in a VueJS component?

Actually I found a solution. I add an event listener on the scroll event when the component is created and remove the event listener when the component is destroyed.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers