Create a new directive (onSwipeUp)

I am trying to create a new directive in order to swipeUp objects, so like onSwipeUp="doThisFunction()"

Here is a post where other people want to do the same :

Here is my app.module.ts

import { SwipeVertical } from '../directives/swipe-vertical.directive';
      declarations: [

Here my home.ts

import { SwipeVertical } from "../../directives/swipe-vertical.directive.ts";

  selector: 'page-home',
  templateUrl: 'home.html',

And in home.html I will use :

<img class="imgUser" (onSwipeUp)="getLike(user, $event)" [src]="user.imgLink">

My code is the same as in this plunker, but I think his code is a bit oudated … :


There are no errors, but the directive (onSwipeUp) is not working …
Maybe add a section like this ? :

host: {
      "[onSwipeUp]": "SwipeUp" 

Thank you very much for your help ! I appreciate it
Luis :slight_smile: