Support for hammer.js touch events in an Angular component's template

ABSTRACT
A project is based on Angular 8.
Hammer.js has been added in order to support touch gestures.

ISSUE

IDE doesn't seem to recognize events provided by hammer.js (for example, "swiperight", "swipeleft") and provides only two options:
* rearrange tag attributes (doesn't work)
* remove an event helper (not applicable)

PyCharm complains with a following error: "Event swipeleft is not emitted by any applicable directives nor by div element".

NOTES

I thought it could be easily fixed by declaring a list of supported events in a HammerGestureConfig (events section) but that didn't work (tried invalidating cache and restart afterward).

4 comments
Comment actions Permalink

Please vote for https://youtrack.jetbrains.com/issue/WEB-43773 to be notified on any progress with it

0
Comment actions Permalink

Got it.
Elena Pogorelova, could you, please, provide a workaround for now that disables that check?
Thanks.

0
Comment actions Permalink

you can suppress it with a comment, like

 

<!--suppress AngularUndefinedBinding -->
<div class="gesture__zone" (swipe)="onSwipe($event)">
0

Please sign in to leave a comment.