notpeter
0
Q:

intersection in ionic josh morony

    // Create the observer
    this.observer = new IntersectionObserver((entries) => {

      entries.forEach((entry: any) => {

        if(entry.isIntersecting){
          // do something if intersecting
        } else {
          // do something if not intersecting
        }
      })

    });

    // Use the observer on specific elements
    this.items.forEach(item => {
      this.observer.observe(item.nativeElement);
    });
0

New to Communities?

Join the community