Giter Club home page Giter Club logo

ng-sticky's People

Contributors

jonasmedeiros avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ng-sticky's Issues

sticky teleports instead of smooth flow

Hi I imported the ngsticky into the directive.
The directive is working however when I am near to the div when scrolling down it teleports to the top instead of a smooth scroll

Error when building for production "ng build --prod"

ERROR in Error: Type NgStickyDirective in
.../node_modules/ng-sticky/ng-sticky.d.ts
is part of the declarations of 2 modules:

AppModule in .../src/app/app.module.ts

and

NgStickyModule in .../node_modules/ng-sticky/ng-sticky.d.ts!

Please consider moving NgStickyDirective in

.../node_modules/ng-sticky/ng-sticky.d.ts

to a higher module that imports AppModule
in

.../src/app/app.module.ts and NgStickyModule

in

.../node_modules/ng-sticky/ng-sticky.d.ts.

You can also create a new NgModule that exports and includes NgStickyDirective in

.../node_modules/ng-sticky/ng-sticky.d.ts

then import that NgModule in AppModule
in

.../src/app/app.module.ts and NgStickyModule

in

.../node_modules/ng-sticky/ng-sticky.d.ts

.

Demo error Plunker

Plunker has a issue with Angular 4 so they are fixing, so the demo for now is not working.

[Feature] Bottom offset

It would be great if I could set a bottom offset that indicates when the block should stop being sticky

Doesn't work with bootstrap collapse

If it's inside some bootstrap 4 collapse it incorrectly identify the top coordinates and starts to position element earlier.
https://getbootstrap.com/docs/4.1/components/collapse/

<p>
  <a class="btn btn-primary" data-toggle="collapse" href="#collapseExample" role="button" aria-expanded="false" aria-controls="collapseExample">
    Link with href
  </a>
</p>
<div class="collapse" id="collapseExample">
  <div class="card card-body">
   <table class="table">
  <thead ng-sticky [offSet]="0" [addClass]="'is-sticky'">
    <tr>
      <th scope="col">First</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Mark</td>
    </tr>
  </tbody>
</table>
  </div>
</div>

SSR Compatibility

I'm currently trying to use this module in an app that leverages server side rendering, but I get this error when attempting to import NgStickyModule:

NodeInvocationException: Prerendering failed because of error: C:\Users\...\node_modules\ng-sticky\index.js:1
(function (exports, require, module, __filename, __dirname) { import { Directive, ElementRef, HostListener, Input, NgModule, Renderer2 } from '@angular/core';
^^^^^^

SyntaxError: Unexpected token import
at new Script (vm.js:51:7)
at createScript (vm.js:138:10)
at Object.runInThisContext (vm.js:199:10)
at Module._compile (module.js:624:28)
at Object.Module._extensions..js (module.js:671:10)
at Module.load (module.js:573:32)
at tryModuleLoad (module.js:513:12)
at Function.Module._load (module.js:505:3)
at Module.require (module.js:604:17)
at require (internal/module.js:11:18)

Angular 5 and beyond support

Are you planning on supporting this directive for Angular 5 and beyond releases? I just upgraded my project from 4 to 5 and while it still seems to work, I get an error when running npm install saying that the package requires a peer of @angular/core@^4.0.0.

This directive has been the only one I've found to actually work and has been a huge time saver for me, thank you!

Broken demo

Hi,

just a little issue to signal that the demo on plunkr is broken.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.