Nurturing Pluto's Martians

    ember-intersection-observer-modifier

    1.0.0 • Public • Published

    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.

    Install

    npm i ember-intersection-observer-modifier

    DownloadsWeekly Downloads

    45

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    9.03 kB

    Total Files

    10

    Last publish

    Collaborators

    • alexlafroscia