inuyaksa / jquery.nicescroll

nicescroll plugin for jquery - scrollbars like iphone/ipad
https://nicescroll.areaaperta.com/
3.6k stars 1.67k forks source link

Nicescroll doesn't remove in angular #742

Closed marcoshier closed 6 years ago

marcoshier commented 6 years ago

Hi, I'm using nicescroll in an Angular 5 (CLI) project. I have a problem, when changing between pages (components) of the application, the divs that control the rails don't remove themselves. I have tried many methods, included: onDestroy, .remove() and .()hide but they don't work.

My hypotesis is that this is due to nicescroll not being rendered inside the app-root but on the real outside: in fact, in the inspector, I can see the div creating itself again and again everytime I load the component with the Nicescroll. How can I solve this?