Slider HammerGestures Are Not Recognised in Lazy-Loaded Component
See original GitHub issueBug, feature request, or proposal:
Bug
What is the expected behavior?
The slider’s hammer gesture should be recognised in lazy-loaded component.
What is the current behavior?
The slider’s hammer gestures ( slideStart, slideEnd and slide ) are not recognised in lazy-loaded component.
If MatSliderModule is imported in AppModule, it works fine. But if MatSliderModule is imported in a LazyLoadedModule, hammer js gestures are not recognised.
Here is the demo.
What are the steps to reproduce?
Providing a StackBlitz/Plunker (or similar) is the best way to get the team to see your issue.
Plunker starter (using on @master
): https://goo.gl/uDmqyY
StackBlitz starter (using latest npm
release): https://goo.gl/wwnhMV
What is the use-case or motivation for changing an existing behavior?
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Is there anything else we should know?
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
LazyLoad “exclude” not working on Chrome? - WordPress.org
When LazyLoad is activated, the slider doesn't work properly as the pictures are not loaded correctly and they all get shifted outside of...
Read more >Angular 4 subscribe not working in lazyload - Stack Overflow
When lazy loading a module, the module providers are re-created. So the components inside that module will get a new instance of the...
Read more >Lazy Loading Images – The Complete Guide - ImageKit.io
For images it usually translates to any image that is not visible to the user up front can be lazy loaded. As the...
Read more >Lazy Load Vue.js Components When They Become Visible
In the video above, you can see how components are not loaded until they become visible. Initially, only a gray placeholder box is...
Read more >How to Lazy Load Images on Shopify to Make Your Site Faster
We can usually lazy load videos as well (if they're not at the top of the page). Option B) If enjoy working with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jelbourn So if I load MatSliderModule in my Lazy-Loaded Module, I need to added
in my AppModule? Is this what you mean in you short term?
Thanks, man
See https://github.com/angular/angular/issues/19874
It’s currently a limitation of Angular that event plugins must be created at bootstrap time. In the short term, you can add a provider just for the Hammer gesture config without needing any of the component modules: