# content.scrollTop is 0 unless I bind to (ionScroll)

**URL:** <https://forum.ionicframework.com/t/content-scrolltop-is-0-unless-i-bind-to-ionscroll/117137>\
**Category:** ionic-v3\
**Created:** [January 3, 2018, 4:51pm UTC](https://forum.ionicframework.com/t/content-scrolltop-is-0-unless-i-bind-to-ionscroll/117137 "2018-01-03T16:51:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![wvoelcker](https://avatars.discourse-cdn.com/v4/letter/w/ed8c4c/32.png) [@wvoelcker](https://forum.ionicframework.com/u/wvoelcker)\
**Post date:** [January 3, 2018, 4:51pm UTC](https://forum.ionicframework.com/t/content-scrolltop-is-0-unless-i-bind-to-ionscroll/117137/1 "2018-01-03T16:51:54Z")

</div>

Hi all,

I’m confused by some behaviour I am seeing in my ionic3 app, and wonder if anyone can help me understand what is going on.

The behaviour is:

I am importing ViewChild and Content

```auto
import { Component, ViewChild, NgZone } from '@angular/core';
import { NavController, NavParams, Content } from 'ionic-angular';

```

And then using them in a page:

```auto
export class MyPage {
	@ViewChild(Content) content: Content;

	constructor(
		public navCtrl: NavController,
		public navParams: NavParams,
		public zone: NgZone
	) {}
}

```

Confusingly, what I am seeing is this.content.scrollTop is 0 - unless in the HTML template I bind ionScroll to a function, like this:

```auto
<ion-content padding (ionScroll)="scrollHandler($event)">

```

scrollhandler can be an empty function:

```auto
scrollHandler() { /* Don't do anything */ }

```

If I bind to ionScroll in that way, this.content.scrollTop works as expected.

Does this make sense to anyone? I can’t see anything in the docs about it.

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:56pm UTC](https://forum.ionicframework.com/t/content-scrolltop-is-0-unless-i-bind-to-ionscroll/117137/2 "2021-07-19T21:56:28Z")

</div>

Closed on July 19, 2021, 9:56pm UTC


