Question: Am looking for something similar to [`scrollIntoView()`](https://developer.mozilla.org/en/docs/Web/API/Element/scrollIntoView) within Ionic2 to use when I click on a button, for example.

None of the methods detailed in [`ion-content`](http://ionicframework.com/docs/v2/api/components/content/Content/) help.

Answer: 
For Ionic-4 there are multiple changes in the terms used 

1. **Content** is changed to **IonContent**
2. **scrollTo** is changed to **scrollToPoint**
3. **ionic-angular** is changed to **@ionic/angular**
4. viewChild has to have **{ static: false }** // only if you are using angular >8.0

Here is the code modified of the accepted answer for ionic-4 

```
<ion-header>
      <ion-navbar primary>
        <ion-title>
          <span>My App</span>
        </ion-title>
      </ion-navbar>
</ion-header>
<ion-content>    
      <button ion-button text-only (click)="scrollElement(target)">Click me</button>

      <div style="height: 600px;"></div>

      <!-- Notice the #target in the p element -->
      <p #target>Secret message!</p>

      <div style="height: 600px;"></div>
</ion-content>

```

component Code : 

```
import { ViewChild, Component } from '@angular/core';
import { IonContent } from '@ionic/angular'; // change-1

@Component({
  templateUrl:"home.html"
})
export class HomePage {
   @ViewChild('target', { static: false }) target: ElementRef;
   @ViewChild('ion_content', { static: false }) ionContent: IonContent; //change-2 for angular > 8.0 remove this for angular 6.x

  constructor() {   }

  public scrollElement($target) {
    this.ionContent.scrollToPoint(0, $target.offsetTop, 500); 
    //$target (prefered if you have multiple scroll target) could be this.target.nativeElement
  }
}

```
I was trying to do this in Ionic 3 and due to the fact that `<Element>.offsetTop` was returning`10` (the padding on the top of the element) instead of the distance to the top of the page (much larger unknown number) I ending up just using `<Element>.scrollIntoView()`, which worked well for me.

To get the `<Element>` object I used `document.getElementById()`, but there are many other options on how to get a handle on that.