jonasmedeiros / ng-sticky Goto Github PK
View Code? Open in Web Editor NEWAngular 4 sticky, have header or any component sticky easy to use.
Angular 4 sticky, have header or any component sticky easy to use.
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
This is one of the few libraries that relies on rxjs-compat in order to run with Angular 6.
Cheers
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
.
Plunker has a issue with Angular 4 so they are fixing, so the demo for now is not working.
It would be great if I could set a bottom offset that indicates when the block should stop being sticky
Trying to add library and code ship is not accepting it.
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>
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)
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!
Hi,
just a little issue to signal that the demo on plunkr is broken.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.