Skip to content

Instantly share code, notes, and snippets.

Yuriy Grunin th0r

Block or report user

Report or block th0r

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@th0r
th0r / angular-in-view-directives.html
Last active Feb 18, 2019
Angular `InView` directives
View angular-in-view-directives.html
<!-- wInViewRoot directive is needed to specify the `root` for `IntersectionObserver` and some other it's options e.g. `margin` -->
<div class="container" wInViewRoot="viewport">
Any content can be here
<w-in-view-item>
<!-- Content will be replaced by a placeholder <div> with the same height as original content.
Also `InViewItemComponent`s change detector will be detached when it become invisible which means
all the content's change detectors won't be reachable and will be inactive as well. -->
</w-in-view-item>
...or any other content can be here
<w-in-view-item>
@th0r
th0r / Fluxible promisify plugin
Last active Aug 29, 2015
Fluxible plugin that allows to use promise-style actions
View Fluxible promisify plugin
var Bluebird = require('bluebird');
module.exports = function promisifyPlugin(options) {
options = options || {};
/**
* Makes promisified `executeAction` method
*
* @param {Object} actionContext
* @returns {Function}
You can’t perform that action at this time.