I try to make Angular based app according to this tutorial: https://material.angular.io/guide/getting-started
The issue is that there is no sliding functionality on Slider and SlideToggle components, the value changes only on click. All dependencies are installed as it is mentioned in Getting started tutorial.
I'm using Chrome 55, HammerJs version 2.0.34, Angular 2.4.3, Material 2.0.0-beta.1
@nkas Make sure to import 'hammerjs'; in app.module.ts. Also, confirm if you see following error in the console, Could not find HammerJS. Certain Angular Material components may not work correctly.
I have similar problem too.
I created an angular project with angular cli and then followed this guide:https://material.angular.io/guide/getting-started
and some of material controls in addition to Slider not works, such as https://material.angular.io/components/component/progress-bar
@mojtab23 Can you take a look if there is a log message in the console?
(
Could not find HammerJS. Certain Angular Material components may not work correctly.)
@mojtab23 I noticed an issue with css - no component was rendered. So added the missing stylesheet:
<link href="https://unpkg.com/@angular/material/core/theming/prebuilt/indigo-pink.css" rel="stylesheet">
@codef0rmer Yes, I imported hammerjs into app.module.ts. Also there are no errors in the console.
@nkas I see. Now only a working demo would save you :-) Share a screenshot as well if possible.
Thank you @DevVersion and @codef0rmer !
@codef0rmer answer fixed my problem.
There is two more things:
@mojtab23 Glad it works now.
Regarding 1) We are aware of that - and it will be fixed as soon as possible
Regarding 2) The response from @codef0rmer is correct. Either you need to use SCSS or a prebuilt theme.
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._