Please suggest any scrollbar plugin for angular 6

Viewed 10346
4 Answers

For scroll bar we can use this also:

Have a look below :use this in the section in which you need scroll bar

<div [style.overflow]="'auto'" [style.height.px]="'250'">

Why not just use the Angular Material scrolling package?

Install Angular CDK

npm install --save @angular/cdk

Import the scrolling module

import {ScrollingModule} from '@angular/cdk/scrolling';

HTML

<cdk-virtual-scroll-viewport itemSize="1" class="viewport">
    <div class="scrolling-example">
        Insert text here...
    </div>
</cdk-virtual-scroll-viewport>

CSS

.viewport {
    height: 200px;
    width: 200px;
    border: 1px solid black;
}

.scrolling-example {
    height: auto;
}

For more details see the Angular CDK scrolling documentation

For a working example see: Stackblitz

Related