As Angular2 is implemented with hammerjs, so it can listen to the pan, pinch events with HostListener:
@HostListener('pinchmove', ['$event'])
onPinchMove(e: any) {
console.dir(e);
}
However I want to implement the pinch and pan functionality, while HostListener cannot listen to the following event:
@HostListener('pinchmove pan', ['$event'])
onPinchMove(e: any) {
console.dir(e);
}
From the documentation of Hammerjs, it's using recognizeWith to listen these two events simultaneously:
var pinch = new Hammer.Pinch();
var pan= new Hammer.Pan();
pinch.recognizeWith(pan);
But can I use HostListener to listen to these two events instead of using the recognizeWith?