UNPKG

ngx-scrollreveal

Version:

Angular directives for ScrollReveal : a JavaScript library for easily animating elements as they enter/leave the viewport.

36 lines (35 loc) 1.63 kB
import { OnInit, OnChanges, SimpleChange, ElementRef } from '@angular/core'; import { NgsRevealConfig } from '../services/ngs-reveal-config'; import { NgsRevealService } from '../services/ngs-reveal.service'; import { AbstractNgsRevealDirective } from './ngs-reveal-common.directive'; /** * Directive to add 'ScrollReveal' functionality to a <b>set of DOM elements</b> (identify via the `[ngsSelector]` attribute) in the page. * This directive is meant to be placed on the <b>parent node</b> that contains the child elements to reveal. * You can optionally add the `[ngsInterval]` attribute to reveal items sequentially, following the given interval(in milliseconds). * You can optionally add the `[ngsSync]` attribute to reveal new child elements that may have been added in the parent node asynchronously. * */ export declare class NgsRevealSetDirective extends AbstractNgsRevealDirective implements OnInit, OnChanges { private elementRef; /** * Custom configuration to use when revealing this set of elements */ _config: string | NgsRevealConfig; /** * CSS selector to identify child elements to reveal */ ngsSelector: string; /** * Sequence interval (in milliseconds) to the reveal child elements sequentially */ ngsInterval: number; /** * Boolean indicating when the set should be synced, to reveal asynchronously added child elements */ ngsSync: boolean; constructor(elementRef: ElementRef, ngsRevealService: NgsRevealService); ngOnInit(): void; ngOnChanges(changes: { [propertyName: string]: SimpleChange; }): void; }