# Ion-content scroll to top in Ionic 2

**URL:** <https://forum.ionicframework.com/t/ion-content-scroll-to-top-in-ionic-2/53112>\
**Category:** ionic-v3\
**Created:** [May 26, 2016, 11:22pm UTC](https://forum.ionicframework.com/t/ion-content-scroll-to-top-in-ionic-2/53112 "2016-05-26T23:22:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ankushagg93](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/ankushagg93/32/103254_2.png) [@ankushagg93](https://forum.ionicframework.com/u/ankushagg93)\
**Post date:** [May 26, 2016, 11:22pm UTC](https://forum.ionicframework.com/t/ion-content-scroll-to-top-in-ionic-2/53112/1 "2016-05-26T23:22:02Z")

</div>

How to scroll to top of ion-content?

---

<div class="post-metadata">

**Author:** ![ankushagg93](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/ankushagg93/32/103254_2.png) [@ankushagg93](https://forum.ionicframework.com/u/ankushagg93)\
**Post date:** [May 26, 2016, 11:27pm UTC](https://forum.ionicframework.com/t/ion-content-scroll-to-top-in-ionic-2/53112/2 "2016-05-26T23:27:17Z")

</div>

I found the solution but couldn’t find how to delete the post. So, I’m pasting solution here

> **[Ionic Framework](https://ionicframework.com/docs/api/components/content/Content/)**
>
> Ionic is the app platform for web developers. Build amazing mobile, web, and desktop apps all with one shared code base and open web standards

```
import {ViewChild} from '@angular/core';
import {Content} from 'ionic-angular';

@Page({...}
export class MyPage{
  @ViewChild(Content) content: Content;

  scrollToTop() {
    this.content.scrollToTop();
  }
}
```
