[转]angular 监听窗口滚动

本文转自:https://blog.csdn.net/ittvibe/article/details/80060801

转自:http://brianflove.com/2016/10/10/angular-2-window-scroll-event-using-hostlistener

import { HostListener} from "@angular/core";

@HostListener("window:scroll", [])
onWindowScroll() {
 //we'll do some stuff here when the window is scrolled
}
原文地址:https://www.cnblogs.com/freeliver54/p/9909590.html