离子2滚动事件 [英] Ionic 2 scroll event

查看:108
本文介绍了离子2滚动事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个离子滚动组件。
我正在尝试在滚动期间执行一些代码。在Ionic 1中,这可以使用on-scroll属性并传递函数。

I have an ion-scroll component. I'm trying to execute some code during scrolling. In Ionic 1 this was possible using the on-scroll attribute and passing a function.

文档也丢失了。在Ionic 2中是否有内置方式来检测滚动,或者我是否必须使用jQuery或窗口滚动事件来添加我自己的事件处理程序?

The documentation is also missing. Is there a built in way in Ionic 2 to detect scrolling, or do I have to fall back on adding my own event handlers using jQuery or window scroll event?

推荐答案

我在这里找到了一个解决方案:滚动无法使用

I found a solution here: "On-scroll" not working in

在里面使用addScrollEventListener ngAfterViewChecked

这篇关于离子2滚动事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆