 						# Calling linker is the only way I found to get access to the tag name of the template
 						# to prevent the directive scope from pollution a new scope is created and destroyed
 						# right after the repeaterHandler creation is completed
-						linker $scope.$new(),
-							(template) ->
-
-								repeaterType = template[0].localName
-								if repeaterType in ['dl']
-									throw new Error "ui-scroll directive does not support <#{template[0].localName}> as a repeating tag: #{template[0].outerHTML}"
-								repeaterType = 'div' if repeaterType not in ['li', 'tr']
-
-								viewport = if controllers[0] and controllers[0].viewport then controllers[0].viewport else angular.element(window)
-								viewport.css({'overflow-y': 'auto', 'display': 'block'})
-
-								padding = (repeaterType)->
-									switch repeaterType
-										when 'tr'
-											table = angular.element('<table><tr><td><div></div></td></tr></table>')
-											div = table.find('div')
-											result = table.find('tr')
-											result.paddingHeight = -> div.height.apply(div, arguments)
-											result
-										else
-											result = angular.element("<#{repeaterType}></#{repeaterType}>")
-											result.paddingHeight = result.height
-											result
-
-								createPadding = (padding, element, direction) ->
-									element[{top:'before',bottom:'after'}[direction]] padding
-									paddingHeight: -> padding.paddingHeight.apply(padding, arguments)
-									insert: (element) -> padding[{top:'after',bottom:'before'}[direction]] element
-
-								topPadding = createPadding(padding(repeaterType), element, 'top')
-								bottomPadding = createPadding(padding(repeaterType), element, 'bottom')
-
-								$scope.$on '$destroy', () ->
-									template.remove()
-
-								builder =
-									viewport: viewport
-									topPadding: topPadding.paddingHeight
-									bottomPadding: bottomPadding.paddingHeight
-									append: bottomPadding.insert
-									prepend: topPadding.insert
-									bottomDataPos: ->
-										scrollHeight(viewport) - bottomPadding.paddingHeight()
-									topDataPos: ->
-										topPadding.paddingHeight()
+						linker $scope.$new(), (template) ->
+
+							repeaterType = template[0].localName
+							if repeaterType in ['dl']
+								throw new Error "ui-scroll directive does not support <#{template[0].localName}> as a repeating tag: #{template[0].outerHTML}"
+							repeaterType = 'div' if repeaterType not in ['li', 'tr']
+
+							viewport = if controllers[0] and controllers[0].viewport then controllers[0].viewport else angular.element(window)
+							viewport.css({'overflow-y': 'auto', 'display': 'block'})
+
+							padding = (repeaterType)->
+								switch repeaterType
+									when 'tr'
+										table = angular.element('<table><tr><td><div></div></td></tr></table>')
+										div = table.find('div')
+										result = table.find('tr')
+										result.paddingHeight = -> div.height.apply(div, arguments)
+										result
+									else
+										result = angular.element("<#{repeaterType}></#{repeaterType}>")
+										result.paddingHeight = result.height
+										result
+
+							createPadding = (padding, element, direction) ->
+								element[{top:'before',bottom:'after'}[direction]] padding
+								paddingHeight: -> padding.paddingHeight.apply(padding, arguments)
+								insert: (element) -> padding[{top:'after',bottom:'before'}[direction]] element
+
+							topPadding = createPadding(padding(repeaterType), element, 'top')
+							bottomPadding = createPadding(padding(repeaterType), element, 'bottom')
+
+							$scope.$on '$destroy', template.remove
+
+							builder =
+								viewport: viewport
+								topPadding: topPadding.paddingHeight
+								bottomPadding: bottomPadding.paddingHeight
+								append: bottomPadding.insert
+								prepend: topPadding.insert
+								bottomDataPos: ->
+									scrollHeight(viewport) - bottomPadding.paddingHeight()
+								topDataPos: ->
+									topPadding.paddingHeight()
 
 						viewport = builder.viewport
 

							if (scrollTop is 0 and not bof) or (scrollTop is yMax and not eof)
								event.preventDefault()

						viewport.bind 'mousewheel', wheelHandler

						$scope.$watch datasource.revision,
							-> reload()

						if datasource.scope
							eventListener = datasource.scope.$new()

							item.scope.$index = first + i for item,i in buffer
							adjustBuffer(null, inserted)

						eventListener.$on "insert.item", (event, locator, item)->doInsert(locator, item)
						eventListener.$on "update.items", (event, locator, newItem)-> doUpdate(locator, newItem)
						eventListener.$on "delete.items", (event, locator)-> doDelete(locator)

		])

