@releasium/ngx-simple-scroll

    1.0.1 • Public • Published

    ngx-simple-scroll

    Angular library that make ability scroll to particular element using service or directive.

    Example of using NgxSimpleScrollService

        const scrollToServiceConfig = {
          targetSelector: `#targetId`,
          async: true,
        };
    
        this.ngxNgxSimpleScrollService.scrollTo(scrollToServiceConfig);
    

    Example of extending NgxSimpleScrollDirective

    @Directive({
    	selector: '[scrollToError]'
    })
    
    export class ScrollToErrorDirective extends NgxSimpleScrollDirective {
    	@Input() targetSelector = 'form-msg:not(:empty)';
    	@Input() async = true;
    	@Input() scrollToFocus = true;
    	@Input() scrollToParent = true;
    	@Input() parentSelector = '.form-group';
    	@Input() scrollToAnimatedObject = false;
    }
    

    Install

    npm i @releasium/ngx-simple-scroll

    DownloadsWeekly Downloads

    17

    Version

    1.0.1

    License

    none

    Unpacked Size

    97.4 kB

    Total Files

    62

    Last publish

    Collaborators

    • konstantink