Issue
How can I set a long press event to a card in Ionic to fire up action sheet for the specific card. Just help me in binding this long press event in ionic
Solution
You can use the following npm package: https://www.npmjs.com/package/ionic-long-press
This plugin should be compatible with Ionic
and Angular 7+
Import the module:
import { LongPressModule } from 'ionic-long-press';
@NgModule({
imports: [
...
LongPressModule
...
]
})
And use in your template:
<button
ion-button
ion-long-press
[interval]="400"
(pressed)="pressed()"
(longPressed)="active()"
(pressEnded)="released()"
></button>
Answered By - Oron Bendavid
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.