Ng Sticky Save

Angular 4 sticky, have header or any component sticky easy to use.

Project README

ng-sticky

Angular 4 Directive

Check demo plunker

Demo

Installation

To install this library, run:

$ npm install ng-sticky --save

Consuming the library

Import library in any Angular 4 application by running:

$ npm install ng-sticky

and then from your Angular AppModule:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';

// Import NgStickyDirective
import { NgStickyDirective } from 'ng-sticky';

@NgModule({
  declarations: [
    AppComponent,
    NgStickyDirective
  ],
  imports: [
    BrowserModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Once the library is imported, you can use the directive:

<div ng-sticky [offSet]="0" [addClass]="'is-sticky'">
  <div>menu</div>
</div>

Development

To generate all *.js, *.d.ts and *.metadata.json files:

$ npm run build

To lint all *.ts files:

$ npm run lint

License

MIT © Jonas Medeiros

Open Source Agenda is not affiliated with "Ng Sticky" Project. README Source: jonasmedeiros/ng-sticky
Stars
25
Open Issues
10
Last Commit
6 years ago

Open Source Agenda Badge

Open Source Agenda Rating