Giter Club home page Giter Club logo

ember-intersection-observer-modifier's Introduction

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.

ember-intersection-observer-modifier's People

Contributors

alexlafroscia avatar dependabot-preview[bot] avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ember-intersection-observer-modifier's Issues

Invalid modifier manager compatibility specified

Using Ember 5.2 and template-imports...

<div {{observeIntersection this.doSearch}} />

manager.js:621 Uncaught (in promise) Error: Invalid modifier manager compatibility specified
at modifierCapabilities (manager.js:621:1)
at new FunctionalModifierManager (modifier-manager.js:54:104)
at managerFor (modifier.js:14:15)
at CustomModifierManager.getDelegateFor (manager.js:666:1)
at CustomModifierManager.create (manager.js:676:1)
at Object.evaluate (runtime.js:2247:1)
at AppendOpcodes.evaluate (runtime.js:1052:1)
at LowLevelVM.evaluateSyscall (runtime.js:4214:1)
at LowLevelVM.evaluateInner (runtime.js:4185:1)
at LowLevelVM.evaluateOuter (runtime.js:4178:1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.