 							topVisibleScope(item.scope) if topVisibleScope
 							datasource.topVisible(item) if datasource.topVisible
 
-						if angular.isDefined ($attr.isLoading)
-							loading = (value) ->
-								viewportScope[$attr.isLoading] = value
-								datasource.loading(value) if datasource.loading
-						else
-							loading = (value) ->
-								datasource.loading(value) if datasource.loading
+						loading = (value) ->
+							adapter.isLoading = value
+							isLoadingAttr = value if $attr.isLoading
+							datasource.loading(value) if typeof datasource.loading is 'function'
 
 						ridActual = 0
 						first = 1

								#log "clipped off top #{overage} top padding #{builder.topPadding()}"

						enqueueFetch = (rid, direction)->
							if (!isLoading)
								isLoading = true
								loading(true)
							if pending.push(direction) == 1
								fetch(rid)

							elem[0].scrollHeight ? elem[0].document.documentElement.scrollHeight

						builder = null

						# 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
