An Angular directive that works with NgxPerfectScrollbar to stick components to the page
<perfect-scrollbar #ps>
<div ngxStickyPs [perfectScrollBarRef]="ps" [bottomOffset]="10">
</div>
</perfect-scrollbar>
To install, run:
npm install ngx-sticky-ps --save
and include the directive in your AppModule:
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
import { NgxStickyPsDirective } from 'ngx-sticky-ps';
@NgModule({
declarations: [
AppComponent,
NgxStickyPsDirective
],
imports: [
BrowserModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
To generate all *.js
, *.d.ts
and *.metadata.json
files:
npm run build
To lint all *.ts
files:
npm run lint
MIT © John Emmons