0.0.8 • Published 7 years ago

ember-scrolled-to v0.0.8

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

ember-scrolled-to

Build Status

This addon provides a mixin for calling an arbitrary function a single time when a component is scrolled to.

Alternatives

Note that ember-in-viewport is a more mature and featureful Ember addon which does roughly the same thing. Non-Ember alternatives include scrollin and scrollmonitor.

Usage

The callback could be used to lazy-load images of artificially-flavored snacks or to kick off an animation of an apple being sliced into eight pieces. The possibilities are endless!

import Ember from 'ember';
import ScrolledTo from 'ember-scrolled-to';

export default Ember.Component.extend(ScrolledTo, {
  scrolledTo() {
    // Your code goes here.  For example:
    this.set('classNames', ['cornucopia']);
  },
});

Clearly this addon should have been named ember-fruit-scroll-up.

Installation

  • git clone https://github.com/w-hat/ember-scrolled-to
  • cd ember-scrolled-to
  • npm install
  • bower install

Running

Running Tests

  • npm test (Runs ember try:each to test your addon against multiple Ember versions)
  • ember test
  • ember test --server

Building

  • ember build

For more information on using ember-cli, visit https://ember-cli.com/.

0.0.8

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago

0.0.0

8 years ago