Scroll detection made with javascript and works in Angular 2 which is detecting up/ down scrolling and doing hiding/showing of an element dependent of the direction of scrolling.
The example is done with 2 elements which needed to be shown and hidden.
[ngClass] is being used to set animation when classes replaced considering the hide and show of an element when scrolling