Skip to content

Commit 8c714d5

Browse files
committed
moved adapter injection point to the viewport scope
1 parent 29b91ec commit 8c714d5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/ui-scroll.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,9 @@ angular.module('ui.scroll', [])
427427
const setIsLoading = $attr.isLoading ? $parse($attr.isLoading).assign : angular.noop;
428428
let disabled = false;
429429

430+
if ($attr.adapter)
431+
$parse($attr.adapter).assign(viewportScope, this);
432+
430433
Object.defineProperty(this, 'disabled', {
431434
get: () => disabled,
432435
set: (value) => (!(disabled = value)) ? adjustBuffer() : null
@@ -599,8 +602,6 @@ angular.module('ui.scroll', [])
599602
};
600603

601604
adapter.reload = reload;
602-
if ($attr.adapter)
603-
$parse($attr.adapter).assign($scope, adapter);
604605

605606
/**
606607
* Build padding elements

0 commit comments

Comments
 (0)