Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working with Angular 12 #30

Closed
slst19 opened this issue Sep 30, 2021 · 2 comments
Closed

Not working with Angular 12 #30

slst19 opened this issue Sep 30, 2021 · 2 comments
Assignees
Labels
bug Something isn't working need more info We need more information or example

Comments

@slst19
Copy link

slst19 commented Sep 30, 2021

I have tried

ng add ngx-scrolltop

And it was giving error for ng-add support.

So then I installed manually

npm install ngx-scrolltop --save

And then added in app.component.html
<ngx-scrolltop></ngx-scrolltop>

and made sure app.module.ts has the NgxScrollTopModule with import.

And I have tried checking in couple of ways and no matter I do after scrolling down nothing shows up.

@bartholomej
Copy link
Owner

bartholomej commented Sep 30, 2021

Hi @slst19 I will take a look soon.

Meanwhile you can try ng12 (ivy compatible) version

ng add ngx-scrolltop@ng12

or

npm install ngx-scrolltop@ng12 --save

Some ideas:

  1. Make sure you put <ngx-scrolltop></ngx-scrolltop> in your real root component (in some custom cases it is not called app.component.html)
  2. Try to find ngx-scrolltop in your rendered DOM. It could be overrided with some of your custom styles.

@bartholomej bartholomej self-assigned this Sep 30, 2021
@bartholomej bartholomej added bug Something isn't working need more info We need more information or example labels Sep 30, 2021
@bartholomej
Copy link
Owner

Angular 13 is here and old libraries are deprecated (without ivy).

Since ngx-scrolltop v3, the library is compiled with IVY and fully supports Angular12+ (you can't use this with older Angular version anymore!)

If you still need to use it with an older version of Angular, then use version 2, which is still available: ng add ngx-scrolltop@2

More info in readme

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need more info We need more information or example
Projects
None yet
Development

No branches or pull requests

2 participants