Skip navigation
Created an infinite scroll for #Angular
0:00 / 0:52

Created an infinite scroll for #Angular

Brecht Billiet

@brechtbilliet5.5K followers

Visit on X
134 likesDownloadOriginal post

14,937 views #Angular

Created an infinite scroll for #Angular 🔍 Very limited code 🏎️ No racing conditions 🔄 Keep loading until screen is full 📏 Load on scroll, resize 🚀 No fixed row height needed 📋 Works with any iterable list Want me to create a free article or video? Share or comment.🚀🥰

10 Comments

Comments from the original post on X (Twitter)

  • Renato Carneiro's profile picture

    @renatoaraujoc

    “It keeps loading more data until the screen is filled”. Does your library listen to unused viewport height or also works with parent container elements?

    2 likes

  • Brecht Billiet's profile picture

    @brechtbilliet

    Great question mate! It uses the IntersectionObserver class. Whenever #trigger is in the viewport, it needs to load more data. This approach works with all different heights of rows, and even with collapsable rows.

    1 like

  • Raphael Gruber's profile picture

    @raphaelgruberDE

    @pick_simplified Why the choose in between. I would appreciate an article AND a video 💪😂

    1 like

  • Brecht Billiet's profile picture

    @brechtbilliet

    @pick_simplified That sounds like an idea 😂💪🚀

    2 likes

  • Gaurav Bhojwani's profile picture

    @gauravbhojwani2

    Are you using IntersectionObserver behind the scenes ?

    1 like

  • Brecht Billiet's profile picture

    @brechtbilliet

    I am! 🤓

    1 like

  • Gergo's profile picture

    @gergobergo

    Again :)

    1 like

  • CharlieDev's profile picture

    @charliedev55

    Please do article or the video or both 🙏🏻🙏🏻🙏🏻🙏🏻

    1 like

  • André Pinto's profile picture

    @aPinix

    Next level challenge is to have sticky like grouped (eg. contacts list) and drag on one point, scroll and drop it far away in the list/table 🚀

    1 like

  • André Pinto's profile picture

    @aPinix

    Another challenge: - Choose the parent (window or any element) by an id/ref/class or Directive - Choose what is the content scrolled that has to be listened to by a Directive or other as well

    1 like