Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

140
Views
Material 2.0.0-beta.3 md-slider not dragging

Hopefully, this is a stupid question.

I just added a md-slider to a project I am building for my employer. (thus I have no code to show sorry)

I Imported MdSliderModule into the module I'm working in. Added the tag in my template where I wanted it. It showed up and looks great but won't drag. I can click on it to change its value but I can't drag it.

Am I missing something? Does Angular have a Dragging module this component uses that I need to import? Has anyone else seen this?

We are using:

  • Angular ^4.0.2
  • Material 2.0.0-beta.3

Any help or suggestions of things for me to try will be helpful. Thank you in advance for your time.

about 4 years ago · Santiago Trujillo
2 answers
Answer question

0

I had exactly the same problem until I discovered that I hadn't installed hammer.js.

npm install --save hammerjs

then add hammerjs as a dependency in the scripts array of your angular-cli.json file:

 "scripts": [
    //possibly other scripts here...
    "../node_modules/hammerjs/hammer.min.js"
  ],
 ...

Hopefully this will resolve the issue - recompile everything to be sure that changes take effect

about 4 years ago · Santiago Trujillo Report

0

Accepted answer alone didn't work for me. Finally found a comment in the issues on github that solved it. After ensuring hammerjs was installed per Step 5 Gesture Support added this to root.module.ts for the win:

import { BrowserModule, HAMMER_GESTURE_CONFIG } from '@angular/platform-browser';
import { GestureConfig } from '@angular/material';

providers: [
    { provide: HAMMER_GESTURE_CONFIG, useClass: GestureConfig },
]
about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!