Long Pressure

I need to catch long pressure on button. Does the framework allow you to manage the event?

of course it does, you just need to make your own.

I’v create a plugin, is disponible to install by npm…

Add in your

import { DirectivesModule } from '@starley/ion-directives';

    imports: [
export class MyComponent {}

and use in your html like this

    <ion-item appPressHold (press)="doSomething()>

     ... Caso queria usar com tempo definido
    <ion-item appPressHold="250" (press)="doSomething()>

See the readme to find another solution!
1 Like