Configure Hammerjs events with angular2

前端 未结 4 1490
天命终不由人
天命终不由人 2020-12-14 05:25

How can I configure hammerjs events in angular2?

To use hammerjs events with angular2 I just have to include events on my html like this:

4条回答
  •  情书的邮戳
    2020-12-14 05:52

    After one of the pull requests to angular, now there is way to override configuration of hammerjs.

    I have answered in other thread about how to override default config variables of hammerjs in angular2 / typescript way.

    By this method you can override all default settings and there is no need to instantiate custom HammerJs plugin.

    Here is link to answer:

    Using mobile events in Angular2

提交回复
热议问题