scroll binding with Aurelia

Quick post on scroll binding- it's easy. You can bind to an element's scrollTop or scrollLeft like this:

<div scrolltop.bind="scrollTop" scrollleft.bind="scrollLeft">
  ...
</div>

You can also bind to scroll events like this:

<div scroll.trigger="handleScrollEvent($event)">
  ...
</div>

Here's a live example:

Note: scroll events can fire extremely rapidly. You shouldn't do a lot of work in your scroll event handler because it will make scrolling choppy. When Aurelia's binding behaviors feature arrives you'll be able to throttle or debounce these types of bindings :)