Reputation: 189
I tried 3 plugins for scroll bar this is the image where I want to insert scroll bar but not getting the results as required ,I want to use scroll bar for angular 6
Plugins reffered are below:
https://www.npmjs.com/package/ngx-perfect-scrollbar
[https://www.npmjs.com/package/ngx-malihu-scrollbar#demo-application][2]
[https://www.npmjs.com/package/angular-smooth-scrollbar][3]
Upvotes: 3
Views: 10743
Reputation: 189
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'">
Upvotes: 3
Reputation: 676
Why not just use the Angular Material scrolling
package?
npm install --save @angular/cdk
import {ScrollingModule} from '@angular/cdk/scrolling';
<cdk-virtual-scroll-viewport itemSize="1" class="viewport">
<div class="scrolling-example">
Insert text here...
</div>
</cdk-virtual-scroll-viewport>
.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
Upvotes: -1
Reputation: 880
I suggest you to use ngx-perfect-scrollbar and if you need example how to use it check this
Upvotes: 3