How to scroll element into view when it's clicked
Am looking for something similar to scrollIntoView() within Ionic2 to use when I click on a button, for example. None of the methods detailed in ion-content help. Please take a look at this working plunker You can use the scrollTo(x,y,duration) method (docs) . The code is pretty simple, first we obtain the position of the target element (a <p></p> in this case) and then we use that in the scrollTo(...) method. First the view: <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)=