Topic: Carousel blocks scrolling
leanpilar pro answered 6 years ago
ERROR ReferenceError: Hammer is not definedI try to:
import 'hammerjs'; // in main.tsas found in some google solution but the same error. the part in my component it works but after I import Hammer in app.modules.ts it stops working. I follow the guide for mobile, is there a missing part I forgot to add?
Damian Gemza staff commented 6 years ago
Dear leanpilar, Did you try to add hammerjs to webpack.config.js whitelist? It's described in our Angular Universal guide: https://mdbootstrap.com/angular/angular-universal/ Best Regards, Damianleanpilar pro commented 6 years ago
I copy your code and have this in the webpack.server.config.js. whitelist: [ /^@agm/core/, /^hammerjs/ ]Damian Gemza staff commented 6 years ago
And you're having the error again? Could you please send me your project at d.gemza@mdbootstrap.com? It would help me t debug your case. Best Regards, DamianFREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: No
- Technology: MDB Angular
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No
Damian Gemza staff commented 7 years ago
Dear fellah, Could you try to config hammerjs in your project? It should help you. I've tried to reproduce your error on iPad, LG G3, Samsung Galaxy A5, and mobile view in Chromium / Firefox, but for me, everything is working fine. Here's link to hammerjs configuration: https://mdbootstrap.com/angular/advanced/mobile/ Best Regards, Damianfellah pro commented 7 years ago
Indeed, it helped. Thanks so much!