# How to sroll to some ion-item by API call

**URL:** <https://forum.ionicframework.com/t/how-to-sroll-to-some-ion-item-by-api-call/13177>\
**Category:** ionic-v1\
**Created:** [November 25, 2014, 9:43am UTC](https://forum.ionicframework.com/t/how-to-sroll-to-some-ion-item-by-api-call/13177 "2014-11-25T09:43:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pluswave](https://avatars.discourse-cdn.com/v4/letter/p/bcef8e/32.png) [@pluswave](https://forum.ionicframework.com/u/pluswave)\
**Post date:** [November 25, 2014, 9:43am UTC](https://forum.ionicframework.com/t/how-to-sroll-to-some-ion-item-by-api-call/13177/1 "2014-11-25T09:43:27Z")

</div>

Hello,

I am trying to scroll to some element by API call,

$uiViewScroll(angular.element(document.getElementById(“SOMEID”)));

it success, but I can’t scroll back to top (by gesture) after that. Any idea ?

---

<div class="post-metadata">

**Author:** ![pluswave](https://avatars.discourse-cdn.com/v4/letter/p/bcef8e/32.png) [@pluswave](https://forum.ionicframework.com/u/pluswave)\
**Post date:** [December 2, 2014, 1:55am UTC](https://forum.ionicframework.com/t/how-to-sroll-to-some-ion-item-by-api-call/13177/2 "2014-12-02T01:55:37Z")

</div>

Anybody know how? thanks in advance.

---

<div class="post-metadata">

**Author:** ![pluswave](https://avatars.discourse-cdn.com/v4/letter/p/bcef8e/32.png) [@pluswave](https://forum.ionicframework.com/u/pluswave)\
**Post date:** [December 2, 2014, 2:31am UTC](https://forum.ionicframework.com/t/how-to-sroll-to-some-ion-item-by-api-call/13177/3 "2014-12-02T02:31:37Z")

</div>

OK I find a solution, the following code works:

```
    $location.hash(<SOMEID>);
    $ionicScrollDelegate.anchorScroll();
```
