Waypoint hooks
Pre-release
Pre-release
Install the beta and report if you have any issues.
$ ember install [email protected]
This pre-release adds a feature where you can now subscribe to didScroll{Up,Down,Left,Right}
hooks that are emitted by the Mixin when the element enters the viewport. This is primarily for the purposes of replacing the waypoints
library in ember-waypoints
to use an Ember implementation instead.
As with any other hook in Ember, you can handle it with:
export default Ember.Component.extend(InViewportMixin, {
didScrollUp() {
console.log('up');
},
didScrollDown() {
console.log('down');
},
didScrollLeft() {
console.log('left');
},
didScrollRight() {
console.log('right');
}
});