angular-slider / ngx-slider

Self-contained, mobile friendly slider component for Angular based on angularjs-slider
https://angular-slider.github.io/ngx-slider/
MIT License
390 stars 175 forks source link

ngx-slider working with angular 16 ? #355

Closed Urvishdudhagara closed 9 months ago

Urvishdudhagara commented 1 year ago

I use ngx-slider in my project but facing error:

Error: src/app/components/e-commerce/e-commerce.module.ts:67:5 - error NG6002: 'NgxSliderModule' does not appear to be an NgModule class.

67 NgxSliderModule


  node_modules/@angular-slider/ngx-slider/slider.module.d.ts:6:22
    6 export declare class NgxSliderModule {
This likely means that the library (@angular-slider/ngx-slider) which declares NgxSliderModule is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.
VicM commented 1 year ago

Yesterday I face the same thing using angular 15.

Use the ngx-slider-v2 package

Not sure what is the problem with the base one, but when installing the v2 version make sure to read the doc and install the proper package version. In your case:

npm install ngx-slider-v2@16.0.0

that will solve the problem, with that I am successfully using the slider.

ccampanale commented 1 year ago

I reviewed this "ngx-slider-v2" package and I'm hesitant to use it myself. The NPM package is rather misleading, linking back to this repository, documentation, etc. even though it is maintained in a different repository. Furthermore, the repository from which is it maintained appears to be a fork of a fork of this repository. I'm not explicitly saying this is an issue but it certainly raises eyebrows.

I personally would like to see official support for NG 14/15/16 from this repository.

danisss9 commented 1 year ago

I reviewed this "ngx-slider-v2" package and I'm hesitant to use it myself. The NPM package is rather misleading, linking back to this repository, documentation, etc. even though it is maintained in a different repository. Furthermore, the repository from which is it maintained appears to be a fork of a fork of this repository. I'm not explicitly saying this is an issue but it certainly raises eyebrows.

I personally would like to see official support for NG 14/15/16 from this repository.

I created the ngx-slider-v2 fork to update the lib to support Angular 14+ because the current oficial version does not support Ivy so it cannot be used in recent versions of Angular.

Altough it seems to be in the plans to update for Ivy support see, you can see my fork as a workaround until that isn't done.

alex-matveev42 commented 1 year ago

@danisss9 when I try to use your slider with min = 25, max=68M, and logScale = true browser is freezed and then dead. Do you have any idea how I can avoid it?

danisss9 commented 1 year ago

@danisss9 when I try to use your slider with min = 25, max=68M, and logScale = true browser is freezed and then dead. Do you have any idea how I can avoid it?

There is a open issue on my Fork about a performance regression compared to this version, but i still didn't find the culprit, would appretiate help trying to debug it

trckndrsch commented 1 year ago

@danisss9 when I try to use your slider with min = 25, max=68M, and logScale = true browser is freezed and then dead. Do you have any idea how I can avoid it?

I think there might be a workaround for your use case: https://github.com/danisss9/ngx-slider/issues/5#issuecomment-1684406881

madmacc commented 1 year ago

ngx-slider-v2@16.0.0 worked for me. Waiting on implementation in this package.

SebConejo commented 1 year ago

ngx-slider doesn't work with Angular 16.

To solve it, you will need to replace ngx-slider by ngx-slider-v2. https://www.npmjs.com/package/ngx-slider-v2.

Follow those steps:

  1. To do that, run npm i ngx-slider-v2

  2. Then, where you're importing ngx-slider, replace your import by this one :

    import { Options } from 'ngx-slider-v2'
  3. Remove 'ngx-slider' dependency on your package.json file. You don't need it anymore.

AlDrag commented 10 months ago

It would be ideal if maintenance of this project could be transferred to someone else.

visuallization commented 10 months ago

Making this package work with angular 16+ would be great! :)

SebConejo commented 10 months ago

@danisss9 Why not make a pull request of your work on v2 on this repo ? Maybe they'll be able to accept it quickly?

danisss9 commented 10 months ago

@danisss9 Why not make a pull request of your work on v2 on this repo ? Maybe they'll be able to accept it quickly?

I could do it, but I just updated the library itself, it still has some broken things like: the docs website generation scripts, some tests and github actions

AlDrag commented 10 months ago

@danisss9 let me know if you need a hand fixing that stuff, as I'm invested in keeping this project up for work.

Edit: if you're planning on making a PR to merge your fork.

danisss9 commented 10 months ago

@AlDrag yes help would be apreciated and i dont mind making a pull request after all that is fixed

Edit: if the original repo gets updates again there wont be a need for my fork

piotrdz commented 10 months ago

Hello everyone, original maintainer of ngx-slider here.

Long story short, this project has stagnated due to reasons better explained in Github issue #351.

But, there is good news. I am now in a position to return to this project and I am very much open to discussing its future, including taking contributions from pull requests and passing the admin duties to another trusted person.

I have created a Discord server called ngx-slider that I wish to use for discussion on the future of this project. Please join it using the link below:

https://discord.gg/C6K9S9r7

Kaizodo commented 10 months ago

Any update on this issue ?

piotrdz commented 10 months ago

@Kaizodo Yes, there is progress. @danisss9 has created a PR from his fork of the repository to upgrade to Angular 17 (#363) and I'm working on reviewing and merging it. I expect the v17 release could be ready by the end of next week (11th Feb).

piotrdz commented 9 months ago

A further update: I have merged the PR to support Angular 17 (#363) and other supporting work that I have done on top of that.

However, there has been a bit of a snag with converting end-to-end (e2e) tests from old protractor framework to new playwright framework. I would like to convert a few more of these tests to have at least a basic coverage of the most important test suites before making a final v17 release.

So the checklist for release as of now is to:

I expect to tick off most of these items in the next day or two.

piotrdz commented 9 months ago

And we are done, I just published version 17.0.0 of the slider with Angular 17 support. Thank you for the patience.

Backports to previous Angular versions (14 through 16) will be completed in the near future.

I am closing this issue as the immediate concern of supporting new Angular versions has been addressed.

piotrdz commented 9 months ago

Work to add backports will be tracked in #368.