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: 
The ion-content **should** have methods for scrolling to particular child elements, however deep. The current methods are okay, but one perspective of the purpose of ionic is to make laborious, boring code like `document.getElementById` obsolete.

The methods also lack control over the scroll animation.

Hence currently the best option is the `scrollIntoView` method. Attach an id to the element you wish to scroll to, then use getElementbyID to call scrollIntoView. So:

**.html**

```html
...
<ion-row id="myElement">

...

</ion-row>

```

**ts**

```js
...
 scrollToMyElement() {
    document.getElementById('myElement').scrollIntoView({
      behavior: 'smooth',
      block: 'center'
    });
  }

```

Then call the method on some DOM event or button click. If your element is conditional this will likely not work. Instead use a conditional **hidden** attribute or, if you must use **ngIf**, time the logic as such that the element is inserted first.

I've tried this with various other ionic (4) UI components and it works fine.
I noticed the above solution don't work well with Angular Universal server-side rendering (SSR) due to `document` not being available server-side.

Hence I wrote a convenient plugin to achieve scrolling to elements in Angular 4+ that work with `AoT` and `SSR`

NPM  

[ngx-scroll-to](https://www.npmjs.com/package/@nicky-lenaers/ngx-scroll-to)

GitHub  

[ngx-scroll-to](https://github.com/nicky-lenaers/ngx-scroll-to)