New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ngx-sticky

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-sticky

Angular sticky boxes

latest
Source
npmnpm
Version
2.0.1
Version published
Maintainers
1
Created
Source

ngx-sticky

Angular sticky boxes

npm npm

Description

Angular attribute directive for the creation of sticky boxes in the web-pages of your applications. Compatible Angular4+.

This directive will have a result similar to the CSS3 property position: sticky but it also allows to set sticky boxes in respect to the bottom baseline of the view.

Installation

To install this component to an external project, follow the procedure:

  • npm install ngx-sticky --save

  • Add NgxStickyModule import to your @NgModule like example below

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

    import { NgxStickyModule } from 'ngx-sticky';

    import { MyTestApp } from './my-test-app';

    @NgModule({
        imports: [ 
          BrowserModule,
          NgxStickyModule 
        ],
        declarations: [ MyTestApp ],
        bootstrap:    [ MyTestApp ]
    })
    export class MyTestAppModule {}

Usage

Apply the appSticky directive to your HTML tags and use the following attributes to manage its options.

    <div appSticky position="top" margin="50" id="myElement"> </div>

Attributes

OptionDefaultTypeDescription
position'top'stringPosition of reference for the sticky. top: the element will stick in respect to the top line. bottom: the element will stick in respect to the bottom line.
margin0numberNumber of pixel for the element margin in respect of the reference position while it is sticky.

Compatibility (tested with)

  • Firefox (latest)
  • Chrome (latest)
  • Edge
  • IE10
  • Safari

License

  • License: MIT

Author

  • Author: barbared

Keywords

  • sticky
  • Angular2+
  • typescript

Keywords

Angular 2+

FAQs

Package last updated on 20 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts