# Tracking ion-content scroll

**URL:** <https://forum.ionicframework.com/t/tracking-ion-content-scroll/84484>\
**Category:** ionic-v3\
**Created:** [March 28, 2017, 9:29am UTC](https://forum.ionicframework.com/t/tracking-ion-content-scroll/84484 "2017-03-28T09:29:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![lukezona](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/lukezona/32/107938_2.png) [@lukezona](https://forum.ionicframework.com/u/lukezona)\
**Post date:** [March 28, 2017, 9:29am UTC](https://forum.ionicframework.com/t/tracking-ion-content-scroll/84484/1 "2017-03-28T09:29:38Z")

</div>

Hi, I’m trying to track a page scroll.

I’ve read about 20 threads (lot of them were using the old event listeners) but I can’t find where I’m doing wrong.

I’m using tabs template and in one tab I’ve put this code:

```
@ViewChild(Content)
content: Content;
...
ngAfterViewInit() {
    console.log("After View Init");
    console.log("CONTENT: ", this.content);

    this.content.ionScroll.subscribe(($event) => {
        this.scrollAmount = $event.scrollTop;
        console.log("SCROLLING: ", this.scrollAmount);
    });
}

```

When open that page it logs “After View Init” and this.content object but when I start scrolling nothing is logged.

I also tried using `<ion-content (scroll)="onScroll($event)">` but without results. I think that is related with the `<div class="scroll-content">` block that is generated by Ionic.

How can I make it works?

---

<div class="post-metadata">

**Author:** ![reedrichards](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@reedrichards](https://forum.ionicframework.com/u/reedrichards)\
**Post date:** [March 28, 2017, 9:38am UTC](https://forum.ionicframework.com/t/tracking-ion-content-scroll/84484/2 "2017-03-28T09:38:26Z")

</div>

Ionic 2.3.0?

=\> [https://github.com/driftyco/ionic/issues/10938](https://github.com/driftyco/ionic/issues/10938)

---

<div class="post-metadata">

**Author:** ![Adonai](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/adonai/32/71684_2.png) [@Adonai](https://forum.ionicframework.com/u/Adonai)\
**Post date:** [March 28, 2017, 9:38am UTC](https://forum.ionicframework.com/t/tracking-ion-content-scroll/84484/3 "2017-03-28T09:38:42Z")

</div>

Hello!!

I think the event is `ionScroll` not `scroll`, check [the API docs](http://ionicframework.com/docs/v2/api/components/content/Content/#output-events)

Try:

```
<ion-content (ionScroll)="onScroll($event)">

```

**Edit:**

I checked and it works perfectly with `(ionScroll)="onScroll($event)"`

---

<div class="post-metadata">

**Author:** ![lukezona](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/lukezona/32/107938_2.png) [@lukezona](https://forum.ionicframework.com/u/lukezona)\
**Post date:** [March 28, 2017, 9:54am UTC](https://forum.ionicframework.com/t/tracking-ion-content-scroll/84484/4 "2017-03-28T09:54:22Z")

</div>

Yes, I am on 2.3.0

I tried now downgrading to 2.2.0 and now it works

Thanks!

---

<div class="post-metadata">

**Author:** ![lukezona](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/lukezona/32/107938_2.png) [@lukezona](https://forum.ionicframework.com/u/lukezona)\
**Post date:** [March 28, 2017, 10:09am UTC](https://forum.ionicframework.com/t/tracking-ion-content-scroll/84484/5 "2017-03-28T10:09:48Z")

</div>

I tried, but it’s a problem with 2.3.0: both (ionScroll) and (scroll) didn’t work.  
Now downgrading to 2.2.0 it works with (ionScroll).

Thanks

---

<div class="post-metadata">

**Author:** ![reedrichards](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@reedrichards](https://forum.ionicframework.com/u/reedrichards)\
**Post date:** [March 28, 2017, 1:18pm UTC](https://forum.ionicframework.com/t/tracking-ion-content-scroll/84484/6 "2017-03-28T13:18:23Z")

</div>

For the record, the brave @jjosef found a workaround or solution to use ionScroll with 2.3.0, see

> <https://github.com/ionic-team/ionic/issues/10938>
