• Version 0.3.5
  • Published
  • No dependencies
  • MIT license


npm i angular2-infinite-scroll
yarn add angular2-infinite-scroll
pnpm add angular2-infinite-scroll


An infinite scroll directive for angular2



variable _default

var _default: {
directives: (
| typeof AxisResolver
| typeof PositionResolver
| typeof InfiniteScroll


    class AxisResolver

    class AxisResolver {}


      constructor(vertical?: boolean);

        method clientHeightKey

        clientHeightKey: () => string;

          method offsetHeightKey

          offsetHeightKey: () => string;

            method offsetTopKey

            offsetTopKey: () => string;

              method pageYOffsetKey

              pageYOffsetKey: () => string;

                method scrollHeightKey

                scrollHeightKey: () => string;

                  method scrollTopKey

                  scrollTopKey: () => string;

                    method topKey

                    topKey: () => string;

                      class AxisResolverFactory

                      class AxisResolverFactory {}



                          method create

                          create: (vertical?: boolean) => AxisResolver;

                            class InfiniteScroll

                            class InfiniteScroll implements OnDestroy, OnInit {}


                              element: ElementRef,
                              zone: NgZone,
                              positionResolverFactory: PositionResolverFactory,
                              scrollRegister: ScrollRegister,
                              scrollerResolver: ScrollResolver

                                property debounce

                                debounce: string | boolean;

                                  property scrolled

                                  scrolled: EventEmitter<InfiniteScrollEvent>;

                                    property scrolledUp

                                    scrolledUp: EventEmitter<InfiniteScrollEvent>;

                                      property scrollWindow

                                      scrollWindow: boolean;

                                        method handleOnScroll

                                        handleOnScroll: (container: PositionStats) => void;

                                          method ngOnDestroy

                                          ngOnDestroy: () => void;

                                            method ngOnInit

                                            ngOnInit: () => void;

                                              method onScrollDown

                                              onScrollDown: (data?: InfiniteScrollEvent) => void;

                                                method onScrollUp

                                                onScrollUp: (data?: InfiniteScrollEvent) => void;

                                                  method shouldTriggerEvents

                                                  shouldTriggerEvents: (shouldScroll: boolean) => boolean;

                                                    class InfiniteScrollModule

                                                    class InfiniteScrollModule {}

                                                      class PositionResolver

                                                      class PositionResolver {}


                                                        constructor(axis: AxisResolver, options: PositionElements);

                                                          property container

                                                          container: any;

                                                            method calculatePoints

                                                            calculatePoints: (element: ElementRef) => {
                                                            height: any;
                                                            scrolledUntilNow: any;
                                                            totalToScroll: any;

                                                              method calculatePointsForElement

                                                              calculatePointsForElement: (element: ElementRef) => {
                                                              height: any;
                                                              scrolledUntilNow: any;
                                                              totalToScroll: any;

                                                                method calculatePointsForWindow

                                                                calculatePointsForWindow: (element: ElementRef) => PositionStats;

                                                                  method defineContainer

                                                                  defineContainer: (windowElement: ContainerRef) => any;

                                                                    method getDocumentElement

                                                                    getDocumentElement: () => any;

                                                                      method pageYOffset

                                                                      pageYOffset: (elem: any) => any;

                                                                        method resolveContainer

                                                                        resolveContainer: (windowElement: ContainerRef) => boolean;

                                                                          class PositionResolverFactory

                                                                          class PositionResolverFactory {}


                                                                            constructor(axisResolver: AxisResolverFactory);

                                                                              method create

                                                                              create: (options: PositionElements) => PositionResolver;

                                                                                class ScrollRegister

                                                                                class ScrollRegister {}

                                                                                  method attachEvent

                                                                                  attachEvent: (options: ScrollRegisterConfig) => Subscription;

                                                                                    class ScrollResolver

                                                                                    class ScrollResolver {}

                                                                                      property lastScrollPosition

                                                                                      lastScrollPosition: number;

                                                                                        method getScrollStats

                                                                                        getScrollStats: (
                                                                                        container: PositionStats,
                                                                                        config: ScrollerConfig
                                                                                        ) => { isScrollingDown: boolean; shouldScroll: boolean };

                                                                                          method isScrollingDown

                                                                                          isScrollingDown: (container: PositionStats) => boolean;

                                                                                            method shouldScroll

                                                                                            shouldScroll: (
                                                                                            container: PositionStats,
                                                                                            config: ScrollerConfig,
                                                                                            scrollingDown: boolean
                                                                                            ) => boolean;


                                                                                              interface InfiniteScrollEvent

                                                                                              interface InfiniteScrollEvent {}

                                                                                                property currentScrollPosition

                                                                                                currentScrollPosition: number;

                                                                                                  interface PositionElements

                                                                                                  interface PositionElements {}

                                                                                                    property horizontal

                                                                                                    horizontal: boolean;

                                                                                                      property windowElement

                                                                                                      windowElement: ContainerRef;

                                                                                                        interface PositionStats

                                                                                                        interface PositionStats {}

                                                                                                          property height

                                                                                                          height: number;

                                                                                                            property scrolledUntilNow

                                                                                                            scrolledUntilNow: number;

                                                                                                              property totalToScroll

                                                                                                              totalToScroll: number;

                                                                                                                interface ScrollerConfig

                                                                                                                interface ScrollerConfig {}

                                                                                                                  property distance

                                                                                                                  distance: {
                                                                                                                  down: number;
                                                                                                                  up: number;

                                                                                                                    property scrollParent

                                                                                                                    scrollParent?: ContainerRef;

                                                                                                                      interface ScrollStats

                                                                                                                      interface ScrollStats {}

                                                                                                                        property isScrollingDown

                                                                                                                        isScrollingDown: boolean;

                                                                                                                          property shouldScroll

                                                                                                                          shouldScroll: boolean;

                                                                                                                            Type Aliases

                                                                                                                            type ContainerRef

                                                                                                                            type ContainerRef = Window | ElementRef | any;

                                                                                                                              Package Files (8)

                                                                                                                              Dependencies (0)

                                                                                                                              No dependencies.

                                                                                                                              Dev Dependencies (38)

                                                                                                                              Peer Dependencies (0)

                                                                                                                              No peer dependencies.


                                                                                                                              To add a badge like this badgeto your package's README, use the codes available below.

                                                                                                                              You may also use to create a custom badge linking to

                                                                                                                              • Markdown
                                                                                                                              • HTML
                                                                                                                                <a href=""><img src="" alt=""></a>