Reputation: 23
Is there any way we can listen to @HostListener('tap') or any gesture in NativeScript Angular Application?
I am trying to develop a Directive, scenario for which is when user open a custom modal/component and tap anywhere outside component will close the the modal/component.
Upvotes: 1
Views: 1187
Reputation: 71
@HostListener('tap', ['$event']) onTap(event: TapGestureEventData) {
// do your stuff here
}
In my case, I was wondering how to pass gesture event data to the handler. Found the answer here.
Upvotes: 1