1
I created a function in which when the user gives a click simple in item, shows a Toast
, an alert, on the screen with the name of this item:
Function in my file .ts
:
itemSelected(item: string) {
this.toastCtrl.showToast("Selected Item: " + item, 'bottom');
}
Already the button is set this way:
<button ion-item *ngFor="let item of people" (click)="itemSelected(item)">
{{ item.firstname }}
</button>
This works normally, however now I would like to create a list of options when the user makes one click long in the item. On native Android it is possible to do this using the method setOnItemLongClickListener
, but I don’t know what the equivalent would be in Ionic. Which method is equivalent to setOnItemLongClickListener
in Ionic 2?
sao would be the
on-hold
?– Neuber Oliveira
@Neuberoliveira I don’t know. Yeah?!
– viana
http://ionicframework.com/docs/api/directive/onHold/
– Thiago Luiz Domacoski
At least in Ionic 1 is, is just testing.
– Neuber Oliveira
Tested: it doesn’t work.
– viana