+###
+globals: angular, window
+
+  List of used element methods available in JQuery but not in JQuery Lite
+    in other words if you want to remove dependency on JQuery the following methods are to be implemented:
+
+    element.height()
+    element.outerHeight(true)
+    element.height(value) = only for Top/Bottom padding elements
+    element.scrollTop()
+    element.scrollTop(value)
+    element.offset()
+
+###
 angular.module('scroller', [])
 
   .directive( 'ngScrollViewport'


                bufferSize = Math.max(3, +$attr.bufferSize || 10)
                bufferPadding = -> viewport.height() * Math.max(.2, +$attr.padding || .5) # some extra space to initate preload in advance

                ###

                List of used element methods available in JQuery but not in JQuery Lite
                in other words if you want to remove dependency on JQuery the following methods are to be implemented:

                element.height()
                element.outerHeight(true)
                element.height(value) = only for Top/Bottom padding elements
                element.scrollTop()
                element.scrollTop(value)
                element.offset()

                ###

                controller = null



            match = $attr.ngScroll.match /^\s*(\w+)\s+in\s+(\w+)\s*$/
            if !match
              throw new Error "Expected ngScroll in form of '_item_ in _datasource_' but got '#{$attr.ngScroll}'"

            itemName = match[1]
            datasourceName = match[2]
