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';
@NgModule({
...
imports: [
...,
DirectivesModule
],
...
})
export class MyComponent {}
and use in your html like this
<ion-content>
...
<ion-item appPressHold (press)="doSomething()>
<ion-label>PressHold</ion-label>
</ion-item>
...
... Caso queria usar com tempo definido
<ion-item appPressHold="250" (press)="doSomething()>
<ion-label>PressHold</ion-label>
</ion-item>
...
</ion-content>```
See the readme to find another solution!
1 Like