Package Exports
- ng-sticky
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ng-sticky) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
ng-sticky
Angular 4 Directive
Check demo plunker
Installation
To install this library, run:
$ npm install ng-sticky --saveConsuming the library
Import library in any Angular 4 application by running:
$ npm install ng-stickyand 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 buildTo lint all *.ts files:
$ npm run lintLicense
MIT © Jonas Medeiros