File

core/common/intersection-observer.service.ts

Index

Methods

Methods

observe
observe(element: ElementRef)

Observes the visibility of the provided element within the viewport.

Always emits the current visibility state immediately upon subscription, then continues to emit updates whenever the visibility changes.

In case IntersectionObserver is not supported by the browser, it will emit true once and complete, indicating that the element is considered visible.

Parameters :
Name Type Optional Description
element ElementRef No

The element to observe

Returns : Observable<boolean>

An observable indicating if the provided element is in the view

results matching ""

    No results matching ""