Hi, I am a newbie for Angular, in this case, I use window scroll event to monitor the scrollTop to change the class name, but after using ng-scrollbar, I found I couldn't do it in that way because ng-scrollbar is used to change the top of style to scroll the viewport.
The following example shows my old codes, then how to use $watch to monitor the top of the element which is generated by ng-scrollbar:
Hi, I am a newbie for Angular, in this case, I use window scroll event to monitor the scrollTop to change the class name, but after using ng-scrollbar, I found I couldn't do it in that way because ng-scrollbar is used to change the top of style to scroll the viewport.
The following example shows my old codes, then how to use $watch to monitor the top of the element which is generated by ng-scrollbar: