Closed punker76 closed 7 months ago
Hello @punker76,
Apologies for the delay in answering.
The reason for the issue with slider interactions that you are experiencing lies with the place where the HammerModule
is imported.
Because of the use of standalone components in the sample provided by you, the HammerModule
should actually be imported only in the app.config.ts
, instead of the app.module.ts
or the app.component.ts
files:
// app.config.ts
import { ApplicationConfig, importProvidersFrom } from '@angular/core';
import { provideRouter } from '@angular/router';
import { appRoutes } from './app.routes';
import { HammerModule } from '@angular/platform-browser';
export const appConfig: ApplicationConfig = {
providers: [
importProvidersFrom(HammerModule),
provideRouter(appRoutes)
],
};
Unfortunately, this has not been stated in the Angular Slider Component Overview page until now. I'm taking steps to update the documentation page.
I'm attaching an updated version of your application source: igniteui-slider.zip
I'm available in case of further questions.
Best regards
@PlamenD95 Thanks for the explanation and the reference to importProvidersFrom. I had already tried to import the module only in the app configuration, but did not use the importProvidersFrom. 👌
Description
The range slider doesn't slide the thumbs and doesn't trigger the value change event during interaction with the mouse.
I use Nx v17 together with Angular v17 and standalone components https://nx.dev/getting-started/tutorials/angular-standalone-tutorial
I also imported the HammerModule and hammerjs.
Steps to reproduce
I used the sample from the documentation: https://www.infragistics.com/products/ignite-ui-angular/angular/components/slider/slider
Here is my application source: igniteui-slider.zip
Result
The slider doesn't slide with the mouse gesture.
Expected result
It should be slide.
Attachments
https://github.com/IgniteUI/igniteui-angular/assets/658431/c0943701-9ac8-499c-abb6-62c218999434
Here is the component from my sample: