UNPKG

@q149/angular-scrollspy

Version:

A simple lightweight library for Angular which automatically updates links to indicate the currently active section in the viewport

47 lines (46 loc) 1.24 kB
import { ScrollSpyService } from '../scroll-spy-service/scroll-spy.service'; /** * A component to wrap section content within that will update the * `ScrollSpyService` when it's in view * * @example * ```html * <sn-scroll-spy-section id="section1" for="foo"> * ... * </sn-scroll-spy-section> * ``` */ export declare class ScrollSpySectionComponent { private scrollSpySvc; /** * Identifies the section * * @memberof ScrollSpySectionComponent */ id: string; /** * Specifies which `ScrollSpy` instance to update * * @memberof ScrollSpySectionComponent */ for: string; /** * Amount of time in ms to wait for other scroll events * before running event handler * * @default 0 * @memberof ScrollSpySectionComponent */ debounce: number; /** * Creates an instance of ScrollSpySectionComponent. * @memberof ScrollSpySectionComponent */ constructor(scrollSpySvc: ScrollSpyService); /** * Updates `ScrollSpy` section when element enters/leaves viewport * * @memberof ScrollSpySectionComponent */ onInViewportChange(inViewport: boolean): void; }