ember-intersection-observer-modifier
Use IntersectionObserver
through an Ember Modifier
Compatibility
- Ember.js v3.12 or above
- Ember CLI v2.13 or above
- Node.js v10 or above
Installation
ember install ember-intersection-observer-modifier
Usage
This addon provides an Ember modifier for attaching a IntersectionObserver
to an element in your Ember template and calling an action when the observer fires.
<div {{observe-intersection this.onChange}} />
Additional configuration options can also be passed as either an additional positional parameter, or as named parameters. You can read more about valid configuration options here.
<div {{ref this "scrollArea"}}> <div {{observe-intersection this.onChange (hash root=this.scrollArea) rootMargin="10px"}} /></div>
Note: the above ref
modifier comes from ember-ref-modifier
Contributing
See the Contributing guide for details.
License
This project is licensed under the MIT License.