@enten/ngx-sticky
An Angular directive for making things sticky when the user scrolls (for Angular 2+) with no jQuery Dependency.
Requirements
- Angular (requires Angular 4.x or higher)
- Supports all major browsers and IE11 and up (lower versions might not be supported)
Features
- Stick all the things!
- Super smooth!
- Tested in real world projects
- Support for Angular Universal
- Prevents page-jumping when switching to sticky mode
- No jQuery or other dependencies - pure Angular solution
- Support for boundaries to make elements stop
Installation
with npm:
npm install @enten/ngx-stickywith yarn:
yarn add @enten/ngx-stickyNow import the NgxStickyModule in the corresponding Module
import { NgxStickyModule } from '@enten/ngx-sticky';
@NgModule({
declarations: [
],
imports: [
NgxStickyModule,
],
providers: [],
})
export class SomeModule { }Usage
<div ngxSticky>
I am sticky!
</div>