AngularJS + Ionic: Label depending on scroll position

I have an ion-content scroll-able item and some anchors in it to jump to certain positions. Outside the ion-content, I have an button which offers to jump to the next position. For example:

Jump to Position2
**Position1**
Text
Text
Text
Text
**Position2**
Text
Text
Text

The quick solution was to attach an listener to on-scroll complete:

<ion-content delegate-handle="scroll1" on-scroll-complete="setTextForScroll()">

And then set the label depending on the scroll position in the controller

 var settingsScroller = $ionicScrollDelegate.$getByHandle('scroll1');
 var posXScroll = settingsScroller.getScrollPosition().top;
 if posXScroll === xy ...

But this is a quick workaround. It will not work on different screen sizes or on an dynamically changing template.

My next idea was to do an attribute directive which adds all in this way marked elements and there position in the rendered scroll to an array and calculate which element is nearest to the scroll position at the moment.

But now i have problems getting the position of the rendered DOM Element to the controller AND I think maybe my approach is to complicated :/.

And ideas? Your help would be much appreciated!! It sounds kinda simple... Scroll -> Label. Done :D

Cheers AucklandDB

If you want to define an anchor that you can scroll to, simply put something like this in you document at the position you want to reach

<a name="anchor"></a>

than you can reach that position this way:

<a href="#anchor">Go to anchor!</a>