Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jonasmedeiros/ng-sticky

Angular 4 sticky, have header or any component sticky easy to use.
https://github.com/jonasmedeiros/ng-sticky

angular angular-cli angular2 angular4 sticky sticky-elements sticky-headers stickyheader

Last synced: 3 months ago
JSON representation

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

Awesome Lists containing this project

README

        

# ng-sticky

Angular 4 Directive

## Check demo plunker
[Demo](https://embed.plnkr.co/zb2igm0xicoeKD9yzwhD/)

## Installation

To install this library, run:

```bash
$ npm install ng-sticky --save
```

## Consuming the library

Import library in any Angular 4 application by running:

```bash
$ npm install ng-sticky
```

and then from your Angular `AppModule`:

```typescript
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:

```xml


menu


```

## Development

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

```bash
$ npm run build
```

To lint all `*.ts` files:

```bash
$ npm run lint
```

## License

MIT © [Jonas Medeiros](mailto:[email protected])