Just learning Angular again. Installed AngularCLI and am trying to add a class on scroll from what I had before using jquery. Do I need to use [ngClass] to check a variable with window location? I am trying to use @HostListener right now.
$(function () {
$(document).scroll(function () {
$nav.toggleClass('scrolled', $(this).scrollTop() > $nav.height());
});
});
$(function() {
$(document).scroll(function() {
var x = $(this).scrollTop();
if (x > 3300) {
$nav.removeClass('scrolled');
}
});
});