Angular2 Customizable Scrollbar
npm install ng2-slimscroll-aotbash
npm install ng2-slimscroll
`
Use Example:
`ts
// app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { HttpModule } from '@angular/http';
import { FormsModule } from '@angular/forms';
import { AppComponent } from './app.component';
import { SlimScrollModule } from 'ng2-slimscroll';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
CommonModule,
HttpModule,
FormsModule,
SlimScrollModule
],
bootstrap: [ AppComponent ]
})
export class AppModule { }
// app.component.ts
import { AppComponent, OnInit } from '@angular/core';
import { ISlimScrollOptions } from 'ng2-slimscroll';
@Component({
selector: 'app-root',
template:
})
export class AppComponent imlements OnInit {
opts: ISlimScrollOptions;
ngOnInit() {
this.opts = {
position: 'right',
barBackground: '#000000',
... // check ISlimScrollOptions for all options
}
}
}
``