[转]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
}

posted on 2018-11-05 15:57  freeliver54  阅读(445)  评论(0编辑  收藏  举报

导航